Open JanCizmar opened 2 years ago
@JanCizmar only json request body is supported. The main use of the library is for strongly typed request and response...
The request is strongly typed:
Relevant part of paths
interface
addFiles_1: {
parameters: {
query: {
ak?: string;
};
};
responses: {
/** OK */
200: {
content: {
"*/*": components["schemas"]["ImportAddFilesResultModel"];
};
};
/** Bad Request */
400: {
content: {
"*/*": string;
};
};
/** Not Found */
404: {
content: {
"*/*": string;
};
};
};
requestBody: {
content: {
"multipart/form-data": {
files: string[];
};
};
};
};
So the request body is strictly typed.
I'm also encountering this use case for endpoints that expect binary bodies. I think this would be achievable by not overriding the body that can be passed via RequesInit
with JSON if it's already present. What do you think @ajaishankar ?
Is there any update on this issue and the PR #50?
Any movement on this? We're hacking around this bug at the moment (using a fetch as a post request). I would prefer to not switch architecture away from this but I can't tell soundly tell my team to continue in footsteps
I need to pass formdata for file upload to the request, but there is no documented way how to do that.