What type of data send the http node post?

Hello, it’s me again. I’m trying to send data from losant to Google Cloud. I use postman to verify if my code work and it work but when i send something from losant to google cloud receive nothing.
I want send this. I try in the body { msg: {{msg}} }, msg = {{msg}} but nothing.

In postman i send this and work

Based on the limited information I have, my only guess so far is that Google is expecting the body of your request to be valid JSON, which would not be true of either of the sample payloads you provided. Thus, you aren’t getting the request come through on the Google side.

Instead, try this in the body -

{ msg: {{jsonEncode msg}} }

… or this -

{ msg: "{{msg}}" }

If that does not fix the issue, I’ll need more information before I can provide any other recommendations. If you could remove any sensitive information from the workflow (such as request tokens), then export it, and attach the file here, I could take a deeper look.

1 Like

Hi Dylan, Here is the workflow. I tried your suggestions but nothing.
playground-application-develop.flow (4.5 KB)
If you want, this is the backend code where i recieve the request.

Thanks for sending. If you have not done so yet, I suggest checking the value of working.response in the Losant workflow, which is the reply received from your HTTP request.

The response is a 500 status code with a message, in the HTML body, of:

TypeError: The view function for 'hello' did not return a valid response. The
				function either returned None or ended without a return statement.

There is also a stack trace but I am leaving that out of this message.

This indicates that yes, the request is going through and is hitting your Google Cloud Function, but that you have other issues on that end.

1 Like

Thanks for the help Dylan, i can resolve the problem. Basically was an error in the backend.