It is not required by eBay and str.length running in node / utf-16 may report wrong sizes
if the string contains special characters like accents or german umlauts and gets transfered as utf-8 / json afterwards
The following error happens when the article.title contains german umlauts.
[{
"errorId":2004,
"domain":"ACCESS",
"category":"REQUEST",
"message":"Invalid request",
"longMessage":"The request has errors. For help, see the documentation for this API.",
"parameters":[
{
"name":"reason",
"value":"Unexpected end-of-input: expected close marker for OBJECT (from [Source: java.io.ByteArrayInputStream line: 1, column: 90])"
}
]
}]
It is not required by eBay and str.length running in node / utf-16 may report wrong sizes if the string contains special characters like accents or german umlauts and gets transfered as utf-8 / json afterwards
@see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#Description @see https://developer.ebay.com/api-docs/static/rest-request-components.html
The following error happens when the article.title contains german umlauts.
Removing the content-length solves all of that.