Help with Http Post codeless request

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<project_name>/image/destroy -X POST --data 'public_id=v1650881505&timestamp=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
    "code": 0,
    "message": "\"message\" must be a string",
    "errorData": {}

Many thanks to everyone that can help me.

Hello @Daniele_Rognone

Welcome to our community and thank you for trying out Backendless.

Try to remove the header object from the request.

Dear @sergey.kuk,
many thanks for your feedback, I tryied removing the header but it is still not working, the error is always the same.

It is very strange. I’m thinking to try other way like using a curl command into the code or any other ways.

Please, let me know it there is a way to make it works.


@Daniele_Rognone I have tried the method in your app and everything looks fine. How can I reproduce the issue?

1 Like

Dear @sergey.kuk ,
I finally found what was wrong in the code.

The issue raise when I try to log directly the result of http response like in the first message.

Now, I removed the http response from the log instruction and the http result of test invokation is 200.



I hope this could be helpful to the community.

Thanks again,