-
Hi! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I don't have any experience myself using this the SP-API. Let's leave this discussion open and see if anyone has any experience of it. |
Beta Was this translation helpful? Give feedback.
-
I have reached a solution for this problem by myself. Yet, this If anybody knows a way of including the header value including space characters without it being split, I'll appreciate the tip. In conclussion, I see no real bugs in the code and it has turned out to be very useful. |
Beta Was this translation helpful? Give feedback.
I have reached a solution for this problem by myself.
According to Amazon SP-API documentation a "User-Agent" header is required, and its value should comply with the following format:
AppId/AppVersionId (Language=LanguageNameAndOptionallyVersion)
I tried to add this header as a default request header of my HttpClient with a code line similar to this:
client.DefaultRequestHeaders.Add(Amazon.Util.HeaderKeys.UserAgentHeader, "App/0.0 (Language=Csharp)");
Yet, this
Add
method converted my string into two different values splitting it by the space character. Hence, theCanonicalRequest
class included a comma in the canonical string that Amazon was not expecting.I temporarily solved it by mod…