Hi,
I'm trying to do a REST request to pull some JSON data with the following code but am getting an error. The owner of the site says I need to put the key in the request header as opposed to appending it. How does one do this in JSL with HTTP Request?
Site documentation here: https://jsonodds.com/documentation
Thanks in advance,
-Mike
key = "cb8abaa5-9b10-11e8-9bbb-0b704e36c1ea"; // substitute your key
url = "https://jsonodds.com/api/odds";
request = New HTTP Request(
URL( url ), // the restAPI endpoint
Method( "GET" ),
Query String( // define key pairs
[["x-api-key" => key]] // JSL associative array
)
);
data = request << Send(); // send the request to the API
//ERROR BELOW
GET https://jsonodds.com/api/odds?x-api-key=cb8abaa5-9b10-11e8-9bbb-0b704e36c1ea
schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
Empty()