OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.75k stars 6.56k forks source link

[BUG] typescript-rxjs cannot handle regular form params(application/x-www-form-urlencoded) #5432

Open rainmanhhh opened 4 years ago

rainmanhhh commented 4 years ago

similar to typescript-fetch #3920 it always use FormData without check api doc "consumes" application/x-www-form-urlencoded should be default content-type FormData should be used only if api doc specific consumes=multipart/form-data probably other client generator have the same problem too

UnleashSpirit commented 3 years ago

I agree, why change default ajax behaviour ? We need access to headers, like real ajax in fact (for content-type and others) I go back to pure rxjs cause of this issue :(

DSaggu commented 1 year ago

I also face the same error for post API request. Generates the model classes through Open-Api.

Am setting content-type = application/x-www-form-urlencoded, even then it is sending multipart/form-data which does not work for my APIs.

I wonder if u guys found any solution.