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 @@ -979,9 +979,10 @@ describe("client", () => {
979
979
} ,
980
980
} ) ;
981
981
// the fetch implementation won't allow sending a body without content-type,
982
- // so it invents one up and sends it, hopefully this will be consistent across
983
- // local environments and won't make the tests flaky
984
- expect ( contentType ) . toBe ( "text/plain;charset=UTF-8" ) ;
982
+ // and it defaults to `text/plain;charset=UTF-8`, however the actual default value
983
+ // is irrelevant and might be flaky across different fetch implementations
984
+ // for us, it's important that it's not `application/json`
985
+ expect ( contentType ) . not . toBe ( "application/json" ) ;
985
986
} ,
986
987
) ;
987
988
You can’t perform that action at this time.
0 commit comments