Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core-client-rest] Update Serialization Check Logic (#30339)
### Describe the problem that is addressed by this PR Currently, all request body that has content types that start with "application/json" will be serialized by the `getRequestBody` function. This is an issue for Schema Registry because the request body has already been serialized and the content type also starts with "application/json". Reordering the serialization method to check for `Uint8Array` before checking for "application/json" would eliminate this problem. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? - Add an option called `skipSerialization` in the internal options bag for sending request. It'll affect the RLC experience and force the customer to use this option to make a successful request - Check for specific content types. It'll be limited in scope and affect other services that also has a similar content type format
- Loading branch information