excel vba - VBA Microsoft.XMLHTTP setRequestHeader not sending cookie -


my vba code send every headers except cookie information.

dim oxmlhttprequest object set oxmlhttprequest = createobject("microsoft.xmlhttp") oxmlhttprequest.setrequestheader "accept", "text/html, application/xhtml+xml, */*" oxmlhttprequest.setrequestheader "accept-language", "ko-kr" oxmlhttprequest.setrequestheader "user-agent", "mozilla/5.0 (windows nt 6.1; wow64; trident/7.0; rv:11.0) gecko" oxmlhttprequest.setrequestheader "content-type", "application/x-www-form-urlencoded" oxmlhttprequest.setrequestheader "accept-encoding", "gzip, deflate" oxmlhttprequest.setrequestheader "connection", "keep-alive" oxmlhttprequest.setrequestheader "dnt", "1" oxmlhttprequest.setrequestheader "cookie", "xxx=yyy" oxmlhttprequest.send[enter image description here][1] 

as see in capture link below, cookie: xxx=yyy missing.. have no clue. please me. thank you.

fiddler capture:

fiddler capture

there's rumour on google have use winhttp object here , not msxml2. e.g.:

option explicit      sub test()          dim objrequest object         dim strresponse string         dim blnasync  boolean          set objrequest = createobject("winhttp.winhttprequest.5.1")         blnasync = true          objrequest             .open "post", "http://www.comparity.net/perl/form.pl", blnasync             .setrequestheader "cookie", "timtam=penguin"             .send             .waitforresponse             strresponse = .responsetext             debug.print strresponse             debug.print .status         end      end sub 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -