Archived Forum Post

Index of archived forum posts

Question:

Unable to post Content-Type: application/json; :( please help

Jan 25 '13 at 09:28

when capturing data in fiddler i get this

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding: deflate Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) Content-Type: application/json; charset=utf-8 and these main values

its a 2 step process i m using quickgetstr for fetching page 1 , storing cookies into memory , then with first page cookies in 2nd page

_http.AcceptCharset = ""; _http.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"; _http.AllowGzip = false; _http.UserAgent = useragent; _http.SetRequestHeader("Content-Type", "application/json; charset=utf-8"); _http.SetRequestHeader("Accept-Encoding", "deflate"); var resp = _http.PostJson(url, body); if (resp != null) sb = resp.BodyStr;

doing this and response is null i m new in chilkat would love to test understand and buy it please help me thank you


Answer

This is the last header :( seems like Accept not changing at all also charset=" why its like this ?

Accept: application/jsonrequest Content-Encoding: identity Content-Type: application/json; charset="utf-8" User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) Accept-Encoding: deflate Accept-Language: en-us Content-Length: 97

thanks


Answer

yeah latest version more over the issue i think is its adding "" before and after the utf-8 i dont have any clue give up on chilkat thanks