dcsimg
Results 1 to 2 of 2
  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2013
    Posts
    28

    Resolved [RESOLVED] How to send 'filtered' http request to Betfair Api for specific Sports market odds?

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

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Sep 2013
    Posts
    28

    Re: How to send 'filtered' http request to Betfair Api for specific Sports market odd


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.