I tried to send a Http POST (without url encoding for the params), but when I looked at the log, the request become a GET instead !
As I understood from the following link, content-type should be set to "text/namevalue".
I tried both
still it doesn't work ie. GET is sent instead of POST.
Latest library is used ie.v18.104.22.168 VC++ 9.0 / win32 (VS2008).
I believe it is a bug.
Check out the documentation of the RedirectVerb property (I think it will help):
RedirectVerb Indicates the HTTP verb, such as GET, POST, PUT, etc. to be used for a redirect when the FollowRedirects property is set to 1. The default value of this property is "GET". This will produce the same behavior as a web browser (such as FireFox). If this property is set to the empty string, then it will cause the same verb as the original HTTP request to be used.
Note: Prior to version 22.214.171.124, the default value of this property was the empty string.
If you explicitly clear the RedirectVerb property, do you get a POST after redirect?
Sorry for my late reply and thanks again for your fast response !
I looked at the log again. My mistake ! I missed out the detail.
Initially, a Correct POST was sent. However, the response received is :
HTTP/1.1 302 Moved Temporarily
Then, the problem appeared, the POST was resend....
It become a GET....
Hence, need to test on a website which will reply "HTTP/1.1 302 Moved Temporarily" to see the issue.
Bingo ! Yes, you are right !
I believe that I have to read the documentation thoroughly next time.
Thanks for your great help !
Best regards Dragon
Ok, done !
Thanks again !
Best regards Dragon
Did you call UsePost on the CkHttpRequest object (though deprecated, I believe it still works), or event better set the HttpVerb property of the CkHttpRequest object to "POST"?
Thanks for your fast reply.
Yes, I did.
Request.AddHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko");