I have a problem with making POST httprequest in VBA. I have fiddler log with some parameters and JSON stuff. Parameters are two, JSON (is that parameter too?) is one. It looks like that:
And here is my question - how to send these parameters all together? Would be ideally in VBA, but even general answer would be great.
I want to say I am kinda new in that stuff.
Greetings, Luke.
Try to provide proper Cookies and Content-Type headers within a request, take a look at the below example, it uses
MSXML2.ServerXMLHTTP
to manage with cookies:The output for me as follows:
and that is the same as results on the webpage:
I add some variables values below, it may help to debug in case of any issues. To watch the content of
sRespHeaders
andsRespText
I used additional procedureWriteTextFile
from this answer.sRespHeaders
after the firstXmlHttpRequest
call (executeWriteTextFile sRespHeaders, "C:\tmp.txt", -1
):aSetHeaders
after extracting cookies:Relevant part
sRespText
containing a table with target data after the secondXmlHttpRequest
call (executeWriteTextFile sRespText, "C:\tmp.htm", -1
):aRows
after parsing table rows:aRows
after parsing table cells:aData
afterDenestify
call: