File tree 2 files changed +5
-5
lines changed
packages/openapi-fetch/test
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -188,8 +188,7 @@ for any request that provides value for the `body` parameter. When the `bodySeri
188
188
` Content-Type ` is omitted, allowing the browser to set it automatically with the correct message part boundary.
189
189
190
190
You can also set ` Content-Type ` manually through ` headers ` object either in the fetch options,
191
- or when instantiating the client. Setting ` Content-Type ` to ` null ` will omit the header, however the native fetch API
192
- will likely set it to ` text/plain ` in this case.
191
+ or when instantiating the client.
193
192
194
193
:::
195
194
Original file line number Diff line number Diff line change @@ -981,9 +981,10 @@ describe("client", () => {
981
981
} ,
982
982
} ) ;
983
983
// the fetch implementation won't allow sending a body without content-type,
984
- // so it invents one up and sends it, hopefully this will be consistent across
985
- // local environments and won't make the tests flaky
986
- expect ( contentType ) . toBe ( "text/plain;charset=UTF-8" ) ;
984
+ // and it defaults to `text/plain;charset=UTF-8`, however the actual default value
985
+ // is irrelevant and might be flaky across different fetch implementations
986
+ // for us, it's important that it's not `application/json`
987
+ expect ( contentType ) . not . toBe ( "application/json" ) ;
987
988
} ,
988
989
) ;
989
990
You can’t perform that action at this time.
0 commit comments