Help: Is it possible to send form-data instead of plain text in a HTTP PUT request logic?

Hi,

How can I make this PUT request work from my Homey?

I’m trying to change the mode of my home energy storage (Sonnen) via Homey Pro Logic.
It is possible through Postman when I test it with “Form-data” but when I put the same data in a Homey Logic HTTP PUT request I get the following error, see the first screenshot below.
I have also confirmed this error via Postman by changing from “Data-form” to “Raw” = same error message.
You should also know that I’ve tried POST request from my Homey with the variable directly in the URL which works. See the last screenshot.

It works with Postman when using “form-data”:

But if I change to “raw” in Postman I get the same error:

Example of another type (POST) request that works from the Homey to the same equipment:
image

Thank you for your help!

Best regards
Rikard

Add header field:
Content-type: application/json

Add JSON format to your body including { } like in your Postman screenshot.

Worked like a charm. Thank you Ronny for your quick reply! <3

image

1 Like