Hi,
I have to send the file to the server with QraphQl API but I cannot.
I knew below code
But not working and not send file
In Php, I make a new CurlFile and upload and that is working
I have to send the file to the server with QraphQl API but I cannot.
I knew below code
B4X:
Dim data As Map
data.Initialize
data.Put("operations",$"{
"query": "mutation UploadChildAvatar($avatar : Upload){UploadChildAvatar(avatar : $avatar ) {avatar}}"
}"$)
data.Put("map",$"{"pic": ["variables.avatar"]}"$)
Dim ht As HttpJob
ht.Initialize("",Me)
ht.PostMultipart("https://service.DOMAIN.com/graphql",data,Array As MultipartFileData(file_))
ht.GetRequest.SetContentType("application/json")
ht.GetRequest.SetHeader("Authorization",MyCodes.GetHeaderToken)
But not working and not send file
In Php, I make a new CurlFile and upload and that is working