You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I'm working with an API that requires me to send some files as multipart/form-data. Is this possible to achieve with restish? This is how the command's help looks like:
I've tried several approaches but I wasn't able to figure out something that works. Some examples:
1.
restish my-api upload-file 650d9c463c92333e6aa6cc0 @file
ERROR: Caught error: not sure how to marshal multipart/form-data
restish my-api upload-file 650d9c463c92333e6aa6cc0 filename: @file
ERROR: Caught error: not sure how to marshal multipart/form-data
I've also tried adding -H "Content-Type: multipart/form-data" to those commands but the result was the same. Am I doing something wrong or is there just no support for multipart/form-data? I will really appreciate any help, thanks!
The text was updated successfully, but these errors were encountered:
@Klarys there's no special logic to handle multi-part forms in Restish yet. For now you can use curl to do it, e.g. see https://everything.curl.dev/http/multipart. I'll consider this a feature request to support it in Restish and will see what I can do.
Thank you for answering and considering this as a future feature request. This functionality is crucial for my use case, so it would be really great to see it implemented.
Hello!
I'm working with an API that requires me to send some files as multipart/form-data. Is this possible to achieve with restish? This is how the command's help looks like:
I've tried several approaches but I wasn't able to figure out something that works. Some examples:
1.
I've also tried adding
-H "Content-Type: multipart/form-data"
to those commands but the result was the same. Am I doing something wrong or is there just no support formultipart/form-data
? I will really appreciate any help, thanks!The text was updated successfully, but these errors were encountered: