Public Sub POSTHttpRequest As String
Dim Result As String
Dim j As HttpJob
Try
j.Initialize("", Me)
j.PostString("https://api.luxand.cloud/photo/verify/1234", [{"name":"image1"},{"photo":"@photo.jpg"}])
j.GetRequest.SetHeader("token","1111111111111"
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Result = j.GetString
End If
Catch
Log(LastException)
End Try
j.Release
Return Result
End Sub
Public Sub POSTHttpRequest As String
Dim Result As String
Dim j As HttpJob
Try
j.Initialize("", Me)
j.PostString("https://rest.nexmo.com/sms/json", [{"from":"15558889999"},{"text":"Hello from Vonage SMS API"},{"to":"15552279966"},{"api_key":"9******8"},{"api_secret":"N************g"}])
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Result = j.GetString
End If
Catch
Log(LastException)
End Try
j.Release
Return Result
End Sub
Public Sub GETHttpRequest As String
Dim Result As String
Dim j As HttpJob
Try
j.Initialize("", Me)
j.Download2("https://api.example.com/submit", ["{'key1':'value1'}"])
j.GetRequest.SetHeader("Content-Type","application/json"
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Result = j.GetString
End If
Catch
Log(LastException)
End Try
j.Release
Return Result
End Sub