betfaiR

The bf_post function sends a post request to the Betfair Exchange API, the user must supply credentials returned by bf_login and a request object built using the bf_basic_req and bf_request functions.

usage

res <- bf_post(body,
               headers,
               dom = "uk")

arguments

param details
body request body, JSON object containing data about the method and filter params, returned by bf_basic_req and bf_request
headers headers, a list containing the session token, returned by bf_login, bf_login returns a list, the element is called ssoid
dom Exchange domain, default is “uk”, change to “aus” to post requests to Australian Exchange

return

bf_post uses httr::POST, the return of this is a list with the raw response, and various other details:

This response is converted using httr::content, which parses this raw response into a list, which is then checked by bf_check, and all being well parsed into a neater format by bf_parse