HTTP Binding and curl

Hello Guys,

I’d need your heIp with this. I have this command in a bash script line what I want to use with OH Http Binding:

curl -X POST -d “grant_type=password&client_id=CLIENT_ID&username=EMAIL@DOMAIN.COM&password=MY_PASSWORD” | jq ‘.json_info’

My Item looks like this, but it does not work. I believe it’s something about the “@” character, but I cannot figure out the solution.

String JSON_INFO “HTTP info [%s]” (Automower) { http="<[{grant_type=password&client_id=CLIENT_ID&username=EMAIL@DOMAIN.COM&password=MY_PASSWORD}:60000:JSONPATH($.my_info)]" }

Can you please help me with this?

As it’s a URL, wouldn’t you urlencode the @? I think you may need to encode the braces { } as well. And as % is used for parameter substitution, you’d escape that and use double %% e.g. %%7B for {