How to make REST call to Content-Type="application/json" via VBA in Excel? -


i'm using google chrome rest api information web server. use: content-type = "application/json" , post command includes groovy code inside payload (the header remains empty):

{ "aaa": "dan", "bbb": "my_data", "ccc": "my_type" }

or post empty in payload

this works fine (i'm getting response in json format)

i want post command vba excel response vba variable, can print cell in worksheet. how do it?

do need download library that?

i tried (without success):

set objhttp = createobject("winhttp.winhttprequest.5.1")

url = "[my_url]"

objhttp.open "post", url, false

objhttp.setrequestheader "content-type", "application/json"

worksheets("sheet1").cells(1, 1)=objhttp

please advise,

needed add: objhttp.settimeouts 30000, 60000, 30000, 120000


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -