xlvba send http post

'VBA function to send HTTP POST to a server:

Function httpPost$(url$, msg$)
    With CreateObject("WinHttp.WinHttpRequest.5.1")
        .Open "POST", url, False
        .setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
        .setRequestHeader "Content-type", "application/x-www-form-urlencoded"
        '.setRequestHeader "secret-pass-key", "your-key"    <--if needed
        .send msg
        httpPost = .responseText
    End With
End Function

'-------------------------------------------------------------------------------------------

'Example usage:
response = httpPost(url, msg)

'-------------------------------------------------------------------------------------------

'Note: This same setup can be used for an HTTP PUT. Just change "POST" to "PUT".
'
'
'

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
vba http post request excel vba send post request excel vba http post send dictionary Send Post Request VBA Send Post Request From Excel vba excel macro post request excel to http hReq CreateObject(&quot;MSXML2.XMLHTTP&quot;) vba HttpRequest send http post in excel-vba send http post in excel vba send http post in vba xl vba send http post xl-vba send http post xlvba send http post excel-vba send http post excelvba send http post excelvba http post xlvba http post xl vba http post xl-vba http post excel-vba http post excel vba http post how to call post method from excel WinHTTPRequest simple post example vba http request excel vba CreateObject(&quot;WinHttp.WinHttpRequest post vba ServerXMLHTTP60 post POST http request from excel excel objhttp vba winhttprequest post action example vba winhttprequest post example excel https post request vba post request send get request vba msxml2 post vba macro excel post request to url vba http end of object http post excel tutorial send post request excel HTTP POST EXCEL http post request excel http request vba excel vba send post request MSXML2.XMLHTTP vba send post request MSXML2.XMLHTTP&quot; vba send post request how to make a https post call from excel microsoft access vba ajax POST specify data microsoft access vba ajax POST excel button that makes a post request post value can't use in header excel vba http request cell http request vba vba call api post https vba http post vba send HTTP POST vba send HTTP POST to server excel vba send HTTP POST excel vba send HTTP POST to server
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source