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
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