Closed
Description
Is there a way by which I can remove the header value from RestSharp request.
Ex. I have added token in the request header and after request execution realized that, token is expired. I wanted to apply regenerated to token to request. If I simply add it using AddHeader, it creates a new parameter entry with same name, and does not override the earlier one.
Looking for a way where either i can remove and add or update header.
If this is not supported,
- one can enumerate the parameters and find a parameter by parameter type and name
- once found, remove it from Parameters list (using List.Remove)
- Then, add it again
I can generate PR by exposing the method. Please suggest if this is good to have feature in the library.
Thanks
Nilesh
Metadata
Metadata
Assignees
Labels
No labels