4
$\begingroup$

Consider the following function:

 URLFetch[
    "https://developers.betfair.com/api.betfair.com/exchange/betting/\
  json-rpc/v1",
    {"StatusCode", "Headers", "Content"},
    "Body" -> json,
    Method -> "POST",
    "Headers" -> {"X-Application" -> DEVKEY, 
    "X-Authentication" -> TOKEN}]

Wolfram advises to use URLRead or URLExecute as from v 11.0 onwards.

What would be the URLRead / URLExecute version of the above given URLFetch?

$\endgroup$
3
  • $\begingroup$ I don't use these so I don't know, but HTTPRequest seems to have all the options you're using here. It goes inside URLRead. The result object has multiple pieces of data in it that you can extract (try result = URLRead[...]; result["Properties"]). $\endgroup$
    – Szabolcs
    Commented Oct 18, 2016 at 20:14
  • 1
    $\begingroup$ I "trial / error-ed" quite a bit with a HTTPRequest inside a URLRead but didn't get it to work. Probably a small issue... $\endgroup$ Commented Oct 19, 2016 at 8:10
  • $\begingroup$ @niloderoock could you provide a working URLFetch example to have something testable? $\endgroup$
    – Kuba
    Commented Nov 29, 2018 at 9:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.