Hello All,
I have a project using a Rest API that I have had success doing in JAVA and I wanted to see if AppGameKit could handle it too.
I have X'd out the sensitive fields, in this Code Snippet:
SubmitRequest:
// This URL works, when the correct data replaces the X's
// https://sandbox.dev.clover.com/v3/merchants/XXXXXXXXXX?access_token=XXXX-XXX-XXXXXX-XXXX
MID$ = "XXXXXXXXXX"
AccessCode$ = "XXXX-XXX-XXXXXX-XXXX"
SetTextString(1, "MID: " + MID$ + " : API: " + AccessCode$)
// Connect to Server
http = CreateHTTPConnection()
SetHTTPHost(http, "sandbox.dev.clover.com", 1)
SetHTTPTimeout( http, 10000)
// Set the URL String
vars$ = MID$ + "?access_token=" + AccessCode$
// Send Request
SendHTTPRequestASync(http, "/v3/merchants/", vars$)
// Wait for Response
while (GetHTTPResponseReady(http) = 0)
SetTextString(1, "Waiting for response...")
Sync()
endwhile
// Return the Response
response$ = "Error"
if (GetHTTPResponseReady(http) > 0) then response$ = GetHTTPResponse(http)
// Clean up Network Connection
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
// Return Response
SetTextString(1, response$)
Return
The first comment shows a URL that if put directly into a browser shows a valid JSON response, but when trying to submit it through AppGameKit, I just get an Error.
I did X out the part of the URL that contains sensitive data, so that link will not pull the data, but if I substitute the correct values, it will.
The MID$ and AccessCode$ variables are the holders of that information.
I think, that all I really need to see is what URL is AppGameKit creating, so I can see where the error is.
Is there any way to see the resulting URL that AppGameKit is submitting, or am I just going about it the wrong way entirely?
Thank you,
Joe