<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>28 Sep 2020 17:58:58 Z</lastBuildDate><pubDate>4 Dec 2017 20:23:10 Z</pubDate><description>Folks,&#13;
&#13;
I am having problems with application developed in Windev 22 (Version 01A220059p). When I use the httpdelete method with the HttpSend() or RestSend() functions, the application sends the message without the (body) content to the WebService:&#13;
&#13;
Example:&#13;
&#13;
hEnviaRequest is httpRequest&#13;
hRecebeRequest is httpResponse&#13;
sEndPoint is string&#13;
   &#13;
sEndPoint = "127.0.0.1:1000/pos/v1/purchases/100"&#13;
&#13;
vConteudo is Variant&#13;
vConteudo.storecode = "1"&#13;
vConteudo.devicecode = "22"&#13;
vConteudo.date = "2017-11-20"&#13;
&#13;
hEnviaRequest..URL = sEndPoint&#13;
hEnviaRequest..Method = httpDelete&#13;
hEnviaRequest..ContentType = "application/json"&#13;
hEnviaRequest..Content = VariantToJSON (vConteudo)&#13;
&#13;
hRecebeRequest = HTTPSend (hEnviaRequest)&#13;
&#13;
The message received in Webservice, sent by the code above, follows:&#13;
&#13;
DELETE /pos/v1/purchases/100 HTTP/1.1&#13;
Host: 127.0.0.1:1000&#13;
User-Agent: Testes22&#13;
Accept: */*&#13;
Content-Type: application/json&#13;
&#13;
This message causes the "500 - Internal Server Error" error.&#13;
&#13;
Using the POSTMAN application, I checked that the function should send this way:&#13;
&#13;
DELETE /pos/v1/purchases/100 HTTP/1.1&#13;
Host: 127.0.0.1:1000&#13;
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36&#13;
Content-Type: application/json&#13;
Accept: */*&#13;
&#13;
{&#13;
"storecode": "1",&#13;
"devicecode": "22",&#13;
"date": "2017-11-20"&#13;
}&#13;
&#13;
The message sent by POSTMAN works perfectly.&#13;
&#13;
When I send it using the HTTPSendForm () function, it places the fields as parameters in EndPoint. Follow the code below:&#13;
&#13;
hEnviaRequest is httpRequest&#13;
hRecebeRequest is httpResponse &#13;
vResposta is Variant&#13;
sEndPoint is string&#13;
   &#13;
sEndPoint = "127.0.0.1:1000/pos/v1/purchases/100"&#13;
&#13;
vConteudo is Variant&#13;
vConteudo.storecode = "1" &#13;
vConteudo.devicecode = "22" &#13;
vConteudo.date = "2017-11-20" &#13;
&#13;
hEnviaRequest..URL = sEndPoint&#13;
hEnviaRequest..Method = httpDelete&#13;
hEnviaRequest..ContentType = "application/x-www-form-urlencoded" &#13;
hEnviaRequest..Content = VariantToJSON(vConteudo)&#13;
&#13;
HTTPCreateForm("FORMD")&#13;
HTTPAddParameter("FORMD", "storecode", "1")&#13;
HTTPAddParameter("FORMD", "devicecode", "22")&#13;
HTTPAddParameter("FORMD", "date", "2017-11-20")&#13;
&#13;
hRecebeRequest =  HTTPSendForm("FORMD",hEnviaRequest)&#13;
&#13;
The message received in Webservice, sent by the code above, follows:&#13;
&#13;
DELETE /pos/v1/purchases/100?storecode=1&amp;devicecode=22&amp;date=2017%2D11%2D20 HTTP/1.1&#13;
Host: 127.0.0.1:1000&#13;
User-Agent: Testes22&#13;
Accept: */*&#13;
&#13;
This message returns error "415 - Unsupported Media Type".&#13;
&#13;
Can anyone help us with this problem?&#13;
&#13;
Kind regards.&#13;
&#13;
Vinicius Souza</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63564-problems-with-httpsend-and-httpsendform-functions-using-httpdelete/read.awp</link><title>Problems with the HTTPSend() and HTTPSendForm() Functions, using the httpDelete method.</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Khaery</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63564-problems-with-httpsend-and-httpsendform-functions-using-httpdelete-68016/read.awp</comments><pubDate>28 Sep 2020 17:58:58 Z</pubDate><description>Hello ,&#13;
i have same problem &#13;
When I use the httpdelete method with the  RestSend() functions, the application sends the messag…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63564-problems-with-httpsend-and-httpsendform-functions-using-httpdelete-68016/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63564-problems-with-httpsend-and-httpsendform-functions-using-httpdelete-68016/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/63564-problems-with-httpsend-and-httpsendform-functions-using-httpdelete/read.awp">Problems with the HTTPSend() and HTTPSendForm() Functions, using the httpDelete method.</source><title>Re: Problems with the HTTPSend() and HTTPSendForm() Functions, using the httpDelete method.</title></item></channel></rss>
