Closed omarojo closed 9 years ago
Yes, there is an example in the readme to send a post request with a json body. You need to pass a Hashtable with the relevant key/value pairs.
Yes, but this form, also contains a binary, is not just JSON.
I see. You are sending from data that includes json. Use the form data example in the readme and encode the json as a string in one of the values.
Is there a way to make this request using your library ? curl -k -F "request={'timezone':'America/New_York', 'lang':'en'};type=application/json" -F "voiceData=@hello.wav;type=audio/wav" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "ocp-apim-subscription-key: YOUR_SUBSCRIPTION_KEY" https://api.api.ai/v1/query
As you can see its a form with JSON body and a binary file. But I just can't understand if your library can do this.