Is there a reason the Content-Disposition and field names are missing in the Recognize responses? The API documentation has it correctly formatted in the examples, but the real responses don't follow the appropriate format for a multipart/form-data messages. Simple libraries / manual response handling work fine, but for multipart parsing libraries (like those found on nuget), they end up throwing errors without the missing data. Maybe was it removed due to it seemingly being an extraneous field, and too much extra traffic when the endpoint must be used so much? For me specifically, I was using the source version of HttpMultipartParser, and had modify it to add a default field name if there wasn't one, but am now moving to some lightweight and custom parsing specifically for AVS, anyway.
I think it is a good note for the Response con api v2 parts to have: Content-Disposition: form-data; name="metadata" for json parts and Content-Disposition: form-data; name="audio" for audio parts is helpful to be able to parse content with libraries. Without that most multiparsers out there are blind from what i have tested.
Thanks for point this out to us. We've made a note of this in our bug tracking system.
I'm glad that you managed to get around this however.
Apologies for the confusion.
Message was edited by:
ps. Content-Length could also help those who are parsing the responses without libraries, rather than identifying the position of all the boundaries prior to reading the binary info between them. Then we could read the responses top-down, with no back-tracking.