I am sending http request to Betfair Api without any filter. It returns huge amount of JSON data. I want to send 'filtered' request as they mention in their documents to filter request using exchangeID but i couldn't understand how to implement that exchangeID filter in my http request code.
Screenshot and link of their document is below which show python example JSON request to filter your request for specific sports using exchangeIDs. I am not fimiliar with python so i am unable to integrate this filter in my VB.NET code
http://docs.developer.betfair.com/do...etting+Started
Here is my code.
Code:
Try
Dim myHttpWebRequest As HttpWebRequest = CType(WebRequest.Create("https://api.betfair.com/exchange/betting/rest/v1/en/navigation/menu.json"), HttpWebRequest)
myHttpWebRequest.Method = "GET"
myHttpWebRequest.KeepAlive = True
myHttpWebRequest.Accept = "application/json"
myHttpWebRequest.Headers("X-Application") = "my-app-key"
myHttpWebRequest.Headers("X-Authentication") = "my-session-token"
myHttpWebRequest.Headers("Accept-Encoding") = "gzip,deflate"
Dim myHttpWebResponse As HttpWebResponse = CType(myHttpWebRequest.GetResponse, HttpWebResponse)
Using responseStream = New GZipStream(myHttpWebResponse.GetResponseStream(), CompressionMode.Decompress)
Using reader As New StreamReader(responseStream, Encoding.Default)
RichTextBox1.Text = reader.ReadToEnd()
End Using
End Using
Catch ex As Exception
MsgBox(ex.Message)
End Try