Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

[WB22] WebDev and cURL (3 replies)

$
0
0
Has anyone used cURL in webdev? I'm trying to make requests by using restRequest and restResponse variables, but without success, the server is responding but it always says that my keys are wrong, which aren't, here is my code:
cMyRequest is restRequest
cMyRequest..URL = "[sandbox-api.openpay.mx]{merchant_ID}/charges"
cMyRequest..Content = "-u {private_key}"
cMyRequest..ContentType = typeMimeJSON
cMyRequest..Method = httpPost
cMyResponse is restResponse = RESTSend(cMyRequest)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMyResponse..Content)
END

The documentation for cURL is as follows:
Authentication example
curl [sandbox-api.openpay.mx] \
-u sk_e568c42a6c384b7ab02cd47d2e407cab:

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>