04-17-2020 10:19 AM
Hello,
Let me start with this is my first project using http requests, so I apologize if I use the incorrect terminology.
I am required to send a DEL request, but include information in the body of the request. I was already successfully using GET and POST (including a body with POST). I see that there isn't a control input into the GET.vi in Data Communication->Protocols->HTTP Client. Does anybody have experience with including a body in a DEL request?
07-24-2023 11:50 AM - edited 07-24-2023 11:51 AM
Hello Community,
I have the same problem. As an example I want to communicate with ThingSpeak. I'm able to write data using the GET and the POST method. If I want to delete the channel data, I need to use the DELETE method. This is defined as follows (found here: https://de.mathworks.com/help/thingspeak/clearchannel.html )
What I've done so far is the following:
But the body data is not a header, as I tried it (and so this gives an error message).
So what I need is a HTTP Delete function, which accepts body data.
Or is there existing a VI which stores body data associated with the HTTP Handle so I can define body data before executing the HTTP Delete function?
I attached the code I used as an llb. To get it to work you need a ThingSpeak account.
07-24-2023 01:17 PM
Hi Dave,
This is a number of years old for me, but I wanted to follow up. I believe that I never got a direct solution for this. Luckily the tool that I was communicating with was a company internal tool and they changed the spec to conform to my ability to not include a body.
Looking around, I see some places saying that a DEL should not have a body. See updated answer in the following:
https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request