SalesforceCommerceCloud / commerce-sdk-isomorphic

Browser & Node.js JavaScript client for B2C Commerce API
https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/
BSD 3-Clause "New" or "Revised" License
43 stars 21 forks source link

Added a test to check the urlencoded body transition #91

Closed tarcang closed 2 years ago

tarcang commented 2 years ago

The story seems to be already implemented by @wjhsf a couple of months ago with these lines in operations.ts.hbs: const headers: Record<string, string> = { {{#if (isRequestWithPayload request)}} "Content-Type": "{{{getMediaTypeFromRequest request}}}", {{/if}} ...this.clientConfig.headers, ...options?.headers }; In this PR I have added a test that checks if the content-type is urlencoded, the body should be urlencoded.