Hi,
I am getting this error while passing Unicode string, For example when I am screening a name
ÖMER HİRFANOĞLU
I am getting error
"Bytes to be written to the stream exceed the Content-Length bytes size specified."
How I can send this text so that it can screen without any error.
Currently I am using UTF8Encoding
UTF8Encoding encoding = new UTF8Encoding();
byte[] byte1 = encoding.GetBytes(postData);
Here is my code
string postData = "{\"entityType\":\"" + entityType + "\",\"groupId\":\"" + groupId + "\",\"providerTypes\":[\"WATCHLIST\"],\"name\":\"" + screenText + "\"}";
string msg = postData;
var contentLength = msg.Length;
UTF8Encoding encoding = new UTF8Encoding();
byte[] byte1 = encoding.GetBytes(postData);
// Assemble the POST request - NOTE every character including spaces have to be EXACT
// for the API server to decode the authorization signature
string dataToSign = "(request-target): post " + gatewayurl + "cases/screeningRequest\n" +
"host: " + gatewayhost + "\n" + // no https only the host name
"date: " + date + "\n" + // GMT date as a string
"content-type: " + "application/json" + "\n" +
"content-length: " + contentLength + "\n" +
msg;
string authorisation = "Signature keyId=\"" + apikey + "\",algorithm=\"hmac-sha256\",headers=\"(request-target) host date content-type content-length\",signature=\"" + hmac + "\"";