locked
how to solve "The format of value 'raw-encrypted' is invalid" when adding to headers ? RRS feed

  • Question

  •  HttpClient client = new HttpClient();
                    client.DefaultRequestHeaders.Add("Apiid", apiid);
                   
                    client.DefaultRequestHeaders.Add("Accept","raw-encrypted");

    im unable to add "raw-encrypted" header to my request ,how can i get this right ?

    19karabo91

    Monday, June 30, 2014 8:00 AM

Answers

  • Take a look here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

    Accept headers often take the form "foo/bar" -- like "text/plain".  There isn't any such accept header as "raw-encrypted", and that's why it's being rejected.  Can you point to (public) documentation on the web service you're trying to reach?

    • Marked as answer by Anne Jing Tuesday, July 8, 2014 7:26 AM
    Monday, June 30, 2014 5:28 PM