Closed andrewgadziksonos closed 2 years ago
Hi @andrewgadziksonos, thanks for reporting this issue! We will have a fix released in the next week or two. I'll let you know as soon as the release is done.
This issue should be fixed in v2.6.1 of the SDK.
Hello!
I'm trying to use the
getAccessToken
function from the ShopperLogin client, and I'm getting a 415 Unsupported Media Type response.Looking at the source code this is where the issue is,
core_1.StaticClient.post
internally is setting thebody
property tobody: JSON.stringify(options.body),
which is wrong for this particular API. The body should bebody: new URLSearchParams(options.body).toString()
and theContent-Type
header set toapplication/x-www-form-urlencoded