I am attempting to send data from a NestJS application to SpeechSuper and having a rather difficult time of it. So far I have not made a successful request to the SpeechSuper API and I have run out of ideas to try.
When I attempt to submit a multipart/form-data request with Axios, regardless of whether I serialize the data manually or simply pass a FormData object, I get a serialization error that appears to be related to the FormData class itself because it occurs even if I do not add anything to the native or form-data-provided FormData object.
However, when I try to use the form-data package's submit method as in the SpeechSuper NodeJS sample, the method does not accept a target URL (only a protocol) and keeps trying to post the data to localhost. In other words the sample given does not appear to work.
How is sending a request from Node supposed to work if the API requires FormData? Is a websocket connection a potential workaround?
I am attempting to send data from a NestJS application to SpeechSuper and having a rather difficult time of it. So far I have not made a successful request to the SpeechSuper API and I have run out of ideas to try.
When I attempt to submit a
multipart/form-data
request with Axios, regardless of whether I serialize the data manually or simply pass aFormData
object, I get a serialization error that appears to be related to theFormData
class itself because it occurs even if I do not add anything to the native orform-data
-provided FormData object.However, when I try to use the
form-data
package'ssubmit
method as in the SpeechSuper NodeJS sample, the method does not accept a target URL (only aprotocol
) and keeps trying to post the data to localhost. In other words the sample given does not appear to work.How is sending a request from Node supposed to work if the API requires
FormData
? Is a websocket connection a potential workaround?Environment info: