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
Implement SendFormUrlEncoded method for application/x-www-form-urlencoded form data (#27)
In #9, the `SendForm` extension method was changed from sending a `application/x-www-form-urlencoded` request to sending one as `multipart/form-data` instead. This is a breaking change in some cases if sending to an endpoint that doesn't expect form data to come in with `multipart/form-data` encoding (OIDC access token requests for example, see opserver/Opserver#426).
This PR re-adds the old behaviour as a new extension method so consuming libraries don't need to add it back themselves.
I expect `application/x-www-form-urlencoded` is the more common media type that consumers will want (when size limitations or file uploads aren't a concern), but I didn't want to revert `SendForm` back to its original behaviour to avoid breaking dependent projects again.
I could also obsolete `SendForm` and provide `SendMultipartForm` / `SendFormUrlEncoded` but I don't think it's important enough to inconvenience consumers with changing their code (and getting build errors using `TreatWarningsAsErrors`).
0 commit comments