Keep Live Request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • epicjono
    Junior Member
    • Feb 2020
    • 15

    #1

    Keep Live Request

    I am wondering the exact request I should have in this function (taken from examples in the bf developer library) in order for my session to not time out:


    ------------------------------------------
    def callApi(jsonrpc_req, appKey, sessionToken, initialHeaders):

    url = "https://api.betfair.com/exchange/betting/json-rpc/v1"

    initialHeaders = {'X-Application': appKey, 'X-Authentication': sessionToken, 'content-type': 'application/json'}

    request = urllib.request.Request(url, jsonrpc_req. encode('utf-8'), initialHeaders)

    response = urllib.request.urlopen(request)
    jsonResponse = response.read()

    return jsonResponse.decode('utf-8')

    ------------------------------------------

    I have read the keep live documentation but unfortunately am very inexperienced with other programming languages other than python and was therefore wondering if there is a simple change I can make to the code above in order to keep my session live, or if there is a much more straightforward function that is applicable to my situation. Thank you for any help.
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    If you are using python come join the rest of us:

    https://github.com/liampauling/betfair

    Comment

    Working...
    X