Hi everyone,
I hope everything is fine, I would like to ask if you can help me with a very simple http post request that does not work.
What I’m trying to do
I’m trying to delete a picture from the service Cloudinary and everything is fine if I use a CURL command, but there is no way to make it works with backendless codeless block that I’ve made.
Please, see the details below.
The CURL command is ok
The following is the curl command that I want to replicate in backendless (for security reason I removed the parameters <project_name> and <api_key>). The code works perfectly and returns http response code 200.
curl https://api.cloudinary.com/v1_1/<project_name>/image/destroy -X POST --data 'public_id=v1650881505×tamp=1651398703&api_key=<you_api_key>&signature=fb7c35b91a9f44a48208a570146c67bd11213552'
The backendless codeless block is not ok
I tryied with a lot of different version of the code, the following seems to be very close to the CURL command but it still does not work.
The response is a bad request error saying that the message must be a string (it’s weird because the body in the request is actually a string).
400 - "message" must be a string
Body:
{
"code": 0,
"message": "\"message\" must be a string",
"errorData": {}
}
Many thanks to everyone that can help me.
Regards,
D