I am working on a driver for the Rain Bird sprinkler. It expects to receive an encrypted payload via an http post.
I attempted the following
httpPost([
uri: "http://$SprinklerIP/stick",
headers: [
"Accept-Language": "en",
"Accept-Encoding": "gzip, deflate",
"User-Agent": "RainBird/2.0 CFNetwork/811.5.4 Darwin/16.7.0",
"Accept": "/",
"Connection": "keep-alive",
"Content-Type": "application/octet-stream"
],
body: send_data
]) { response2 ->
It fails with the error groovy.lang.MissingMethodException: No signature of method: groovyx.net.http.EncoderRegistry.encodeForm() is applicable for argument types: ([B, java.lang.String)
If I send a string instead it succeeds but of course is rejected by the endpoint since it is expecting a different format. Any thoughts - is sending a byte array this way supported?