As with so many postings, POSTMAN works fine, but I cannot figure out how to get FMP to accept the URL parameters and I would appreciate some guidance.
As you can see on this site:
The expected CURL parameters are:
curl -s -X POST
-H "X-RosetteAPI-Key: your_api_key"
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Cache-Control: no-cache"
-d '{"content": "Por favor Señorita, says the man." }'
"https://api.rosette.com/rest/v1/language"
In FileMaker, I tried putting the test text right in the "-d" above, but that didn't work so I created a field for it.
My FileMaker URL Parameters are:
"--X POST " &
"--header "X-RosetteAPI-Key: 123456789"" &
"--header "Content-Type: application/json"" &
"--header "Accept: application/json"" &
"--header "Cache-Control: no-cache"" &
"--data " " & GetAsURLEncoded(Rosette Language::theJson)
But, I get this error back:
{"code":"badRequestFormat","message":"Unexpected character ('%' (code 37)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 1, column: 3]","stack":null}
My form, for what it's worth, looks like this:
Can anyone see why FileMaker is failing? I've worked at this for hours now....
Thanks!