Greetings.
I want to use a web api (Tested with postman and c#).
This has two parameters, a file and a token. The file does not reach the webapi. This is the code I am using.
Thank you.
I want to use a web api (Tested with postman and c#).
This has two parameters, a file and a token. The file does not reach the webapi. This is the code I am using.
Code:
Dim URL As String = "https://a373-84-79-160-209.ngrok-free.app/Reconocimiento/Reconocer"
Dim j As HttpJob
j.Initialize("", Me)
Dim fd As MultipartFileData
fd.Initialize
fd.KeyName = "file"
fd.Dir = File.DirDefaultExternal
fd.FileName = "ejemplo.jpg"
fd.ContentType = "image/jpg"
j.PostMultipart(URL, CreateMap("Token": "1234"),Array(fd))
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Leer_Json_Respuesta_json (j.GetString)
Else
Log ("error")
Log(j.ErrorMessage)
Log(LastException)
End If
j.Release
Thank you.