I have been writing a C# program to deal with and send web requests and they seem to be working as intended, however I have in my code the following two headers within my HttpWebRequest
:
request.Accept = "application/xml";
request.Expect = "application/xml";
I am a little confused of the difference or which way round these are, could some one please clarify to me which is which or if I am wrong. Am I right in thinking Accept
is what I am expecting them to take from me me (e.g an XML) and Expect
is what they should return to me, i.e. what I am expecting in return.
Have I got this wrong? a lot of the stuff I can find on-line in documentation is a little vague and confusing for me to understand, am I even using expect correctly or should it be something completely different?
Any clarification would be fantastic, thanks