New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Support needed] Request Connection header Keep-Alive #781
Comments
As I mentioned the best option is to create your own Is there some samples? P.S. Is it over-design? |
How can I redefine |
what is your use case for needing this? i'm not sure the framework can support setting this header like that base on the error message you've provided. |
Problem has been solved with DI |
Any news on this? Is RestSharp dead or unwilling to resolve this? I know it's been around for a few years at least? |
it is not dead, i'm looking for help maintaining the project as my availability has greatly reduced. keep in mind that this is an open source project that you can contribute to. |
…n' to 'keep-alive' or 'close' using the existing header dictionary
I just added a pull request to help solve this problem. My first pull-request ever... |
support added for #781: Keep-Alive Functions
Hi! When I try to make two requests in sequence , the last request fails and I get an error : "The server committed a protocol Violation Section = ResponseStatusLine . " . I think this is happening because the first request is open. Does anyone have an example of how I can do to make a request and close then ? Thanks! |
How to set Connection to keep-alive with RestClient? |
@matthewberkland I still get exception "Keep-Alive and Close may not be set using this property.
What am I doing wrong? |
Same issue - attempting to work around a possibly buggy server-side (or proxy?) behavior concerning chunked transfer encoding, tried to avoid chunking by sending Connection:close header with my RestSharp client requests, ran into this limitation... |
Anyone got a workaround for this issue? |
@fruthninja if you look at the code, you will find out that adding a header "Connection" : "keep-alive" would enable keep-alive on web request. Have you tried and it does not work? |
@alexeyzimarev Thanks for your answer. I tried adding the header to RestClient and RestRequest and getting the error: |
@fruitninja22 Please share your code and ensure you are using the latest version of RestSharp (106.1) |
Haha shame on me. I updated to the newest Version. |
Still check how it works. |
Yeah it works for me now. |
Cool. |
I have a RestClient that I need to include the Connection:"closed" header.
When I try to set this in
IAuthenticator::Authenticate
withrequest.AddHeader("Connection", "close");
I receive a very specific error message that it is not possible to set this header:Keep-Alive and Close may not be set using this property.
Also I need to set it to
close
and can't do it...The text was updated successfully, but these errors were encountered: