1

I am using restsharp to consume a restful api. A code that used to work stopped working, apparently because I have to set 'accept headers' in my http get request. I understand that, according to some google searches, the accept header stuff is set by default by restsharp. So I obtained this http traffic via fiddler:

GET https://xxxx HTTP/1.1 Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml User-Agent: RestSharp 104.1.0.0 Host: test.nortechonline.net Cookie: username=xxxx; auth_key=xxxx; ws_key=xxxx Accept-Encoding: gzip, deflate 

Does this show that 'accept headers' is enabled?

2
  • Yes. There's an Accept: XXXXX header there. saying you'll accept most flavors of json, xml and javascript as responses. If you look here: w3.org/Protocols/rfc2616/rfc2616-sec14.html It'll show you more detail about the Accept header. Commented Feb 22, 2013 at 15:00
  • Thanks. Feel free to write an answer. Commented Feb 22, 2013 at 15:07

1 Answer 1

1

Yes. There's an Accept: XXXXX header there. saying you'll accept most flavors of json, xml and javascript as responses. If you look here: w3.org/Protocols/rfc2616/rfc2616-sec14.html It'll show you more detail about the Accept header.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.