Help with JSON POST request


#1

I am struggling to get this request to work. I believe the issue is the authentication code that needs to be transmitted in the header. I tried setting it as a value in the authorization header field but I keep getting this error:

Error executing external web request: groovyx.net.http.HttpResponseException: Unauthorized

This is the cURL request that I know works:
curl -X POST
https://dev.sighthoundapi.com/v1/detections?type=face%2Cperson&faceOption=landmark%2Cgender’ \

-H ‘x-access-token: BYus**********Qw6BzTw6eQ’
-d '{“image”: "https://
.com/image.jpg"}’


#2

Sorry, you won’t be able to send a custom header, currently webCoRE only supports the Authorization header. In the past when this question came up the API happened to support alternate authorization options that worked but I don’t see anything for Sight Hound.

There is a feature proposal that would allow custom headers among other capabilities but there was little interest. Please reply there if you’re interested in the proposal or have another idea for custom headers!