Hi all, I've a little problem with delete method of httpjob.
I need to send a json string to DELETE, I'm trying a different solutions but no one work
always return
ResponseError. Response: {"status":"Bad Request","errors":[{"error_code":"missingHeader","info":"invalidBody"}],"request_id":"8235427456","code":400}
Where is my error? How I can send a string in a DELETE method?
Thank you
I need to send a json string to DELETE, I'm trying a different solutions but no one work
mycode:
dim param as string
param = $"{"var1":"1","var2":"2","var3":"3","var4":"4"}"$
'This is my param string to send (AS IT IS)
'I've try with
http.Delete2("https://www.website.com/v8/list/" & MyItem , params) '-> no work
'And tryed
http.PostString("https://www.website.com/v8/list/" & MyItem , param)
http.GetRequest.InitializeDelete("https://www.website.com/v8/list/" & MyItem ) '-> same result
'this is my http header
http.GetRequest.SetHeader("Content-Type:","text/plain;charset=UTF-8")
http.GetRequest.SetHeader("Accept","application/json, text/plain, */*")
http.GetRequest.SetHeader("User-Agent", UserAgent)
http.GetRequest.SetContentEncoding("gzip, deflate, br")
http.GetRequest.SetHeader("Accept-Language", "it-IT,it;q=0.9")
http.GetRequest.SetHeader("Connection", "keep-alive")
http.GetRequest.SetHeader("Content-Length", param.Length ) 'when available'
http.GetRequest.SetHeader("Origin", "https://www.website.com")
http.GetRequest.SetHeader("Referer", "https://www.website.com")
http.GetRequest.SetHeader("sec-ch-ua", $""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""$)
http.GetRequest.SetHeader("sec-ch-ua-mobile", "?0")
http.GetRequest.SetHeader("Sec-Fetch-Dest", "empty")
http.GetRequest.SetHeader("Sec-Fetch-Mode", "cors")
http.GetRequest.SetHeader("Sec-Fetch-Site", "same-site")
http.GetRequest.SetHeader("X-Subito-Channel", "web")
http.GetRequest.Timeout = 180000
Wait For(http) jobDone(http As HttpJob)
always return
ResponseError. Response: {"status":"Bad Request","errors":[{"error_code":"missingHeader","info":"invalidBody"}],"request_id":"8235427456","code":400}
Where is my error? How I can send a string in a DELETE method?
Thank you