Pass multiple query strings to url using HTTPWebRequest

  • Thread starter Thread starter Arch_1605
  • Start date Start date
A

Arch_1605

Guest
Im trying to read data from API (in Json format) and load it into SQL server using script task in SSIS.

Dim Request1 As System.Net.HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(URL), System.Net.HttpWebRequest)
Dim Object1 As [Object]
Dim Response1 As System.Net.HttpWebResponse = Nothing
Dim reader1 As System.IO.StreamReader
Dim myResponseString As String

Request1.Headers.Add("Authorization: Token *****")

Try
Response1 = DirectCast(Request1.GetResponse(), System.Net.HttpWebResponse)
reader 1= New System.IO.StreamReader(Response1.GetResponseStream())
myResponseString = reader.ReadToEnd()



Im able to do this with the URL. However, the requirement now is to pass different query strings to the URL and load the data into SQL.

Could someone please provide the code sample to achieve this.

Thanks

Continue reading...
 
Back
Top