Post multiple winhttp request

crorepathi

New Member
Joined
Nov 10, 2006
Messages
9
Hi

In the below pasted code , i need to place multiple url in strUrl code so that I can send multiple URL request..Let me know what alteration has to be done..

Sub Test_Order()

Dim objRequest As Object
Dim strUrl As String
Dim blnAsync As Boolean
Dim strResponse As String
Dim state As Integer

Set objRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
strUrl = "http://127.0.0.1:12000/api/APIConnect?message=NPM,PJYS1201,NRML,L,RELIANCE 25-Mar-2021,BUY,500,2050,nse_fo,S1"
blnAsync = True

With objRequest
.Open "GET", strUrl, blnAsync
.SetRequestHeader "Content-Type", "application/json"
.Send
.WaitForResponse
strResponse = .responseText


End With

Debug.Print strResponse

End Sub
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
why cant you loop and send 1 at a time
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top