Click here to Skip to main content
15,888,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This code, is working perfectly (getting data with web request) :
Dim request As HttpWebRequest = DirectCast(WebRequest.Create(resource_url), HttpWebRequest)
    request.Headers.Add("Authorization", authHeader)
    request.Method = "GET"
    request.ContentType = "application/json"
    request.Accept = "application/json"
    Try
        Dim response As WebResponse = request.GetResponse()
        Dim datastream As Stream = response.GetResponseStream
        Dim reader As StreamReader = New StreamReader(datastream)
        Dim responsefromserver As String = reader.ReadToEnd
        If responsefromserver = Nothing Then
            TextBox1.Text = "No response from server"
        Else
            Dim json As String = responsefromserver
            Dim ser As JObject = JObject.Parse(json)
            Dim data As List(Of JToken) = ser.Children().ToList
            Dim output As String = ""
            Dim successReq As Boolean = False
            Dim avDom As String = ""
            Dim counter As Integer = 0
            For Each item As JProperty In data
                item.CreateReader()
                output += "|-" & item.Name.ToString & " :  " & item.Value.ToString & "-"
                output += Environment.NewLine
                counter += 1
            Next
            TextBox1.Text = output
            TextBox1.Text += Environment.NewLine + counter.ToString
            reader.Close()
            response.Close()
        End If
    Catch ex As Exception
        TextBox1.Text = ex.Message.ToString
    End Try
End Sub

When i try to add some filters, it fails. for example, I try to add the limit filter this way : Dim resource_url = "http://www.inart.com/api/rest/products/store/1?limit=1".
I am sure that the filter is ok because i tried at postman application and it is working!
What should I change or add? Thank you.

What I have tried:

I tried that :
Dim resource_url = "http://www.inart.com/api/rest/products/store/1?limit=1".
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900