Sub AppStart (Args() As String)
Log("Hello world!!!")
RunRestAPI
StartMessageLoop
End Sub
public Sub RunRestAPI()
Dim j As HttpJob
j.Initialize("", Me)
Dim authCurrentMasterID As String = "aaa"
Dim jsonB As String = $"{
"otId": "${authCurrentMasterID}",
"task": "push_registrations",
"parameters": {
"date_from": "2021-10-14 00:00:00",
"date_until": "2021-10-15 23:59:59"
}
}"$
j.PostString($"https://sync.onetwo.klanten.webdoos.io/bouwsoft/task/create"$, jsonB)
j.GetRequest.SetContentType("application/json")
Wait For (j) Jobdone(j As HttpJob)
If j.Success Then
Log("Success")
Else
' Log(j.ErrorMessage)
End If
j.Release
End Sub
Output:
Waiting for debugger to connect...
Program started.
Hello world!!!
ResponseError. Reason: Internal Server Error, Response: <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow,noarchive" />
<title>An Error Occurred: Internal Server Error</title>
<style>body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
.container { margin: 30px; max-width: 600px; }
h1 { color: #dc3545; font-size: 24px; }
h2 { font-size: 18px; }</style>
</head>
<body>
<div class="container">
<h1>Oops! An Error Occurred</h1>
<h2>The server returned a "500 Internal Server Error".</h2>
<p>
Something is broken. Please let us know what you were doing when this error occurred.
We will fix it as soon as possible. Sorry for any inconvenience caused.
</p>
</div>
</body>
</html>
I haven't added HU2_ACCEPTALL. I don't see a SSL error.