Hi,
We are trying to upload an audio file for a prompt resource.
I've seen the examples here, but our primary development is in Java rather than the languages for which the sample is shown. As the upload doesn't appear to actually require the use of the Architect SDK, we've been trying to replicate the functionality in Java using a similar POST request.
Unfortunately, this is being rejected by the Genesys server with a 400 error and no further info as to what the problem was.
I've repointed the request to another server (to avoid having to set up a trusted proxy for https to view the payloads) and performed the failing POST, alongside a successful one produced using a modified version of the node,js sample. There appears to be little difference between the two requests, as shown below.
How should we be modifying the Java request so it will be accepted?
Java request:
METHOD: POST
URL
http://postman-echo.com/post
HEADERS
accept: text/plain, application/json, application/*+json, /
authorization: bearer
content-length: 91478
content-type: multipart/form-data;charset=UTF-8;boundary=NpQNBO0ZgdQqL0wBrb24geFDCGm7dIK3
host: postman-echo.com
proxy-connection: keep-alive
user-agent: Java/1.8.0_211
--NpQNBO0ZgdQqL0wBrb24geFDCGm7dIK3
Content-Disposition: form-data; name="file"; filename="taunt.wav"
Content-Type: audio/wave
Content-Length: 91284
node.js request:
METHOD: POST
URL
http://postman-echo.com/post
HEADERS
accept: application/json, text/plain, /
authorization: bearer
connection: close
content-type: multipart/form-data; boundary=--------------------------755115341751196350250966
host: postman-echo.com
transfer-encoding: chunked
user-agent: axios/0.20.0
----------------------------755115341751196350250966
Content-Disposition: form-data; name="file"; filename="taunt.wav"
Content-Type: audio/wave