Hi,
When calling the ScreeningRequest API with a name containing accents, I'm having one time in two HTTP 400.
I'm doing the following when sending my request:
- The content body is converted to UTF-8.
- We calculate the length of the UTF-8 encoded content since UTF-8 payload length is different than the normal payload body.
- We're using the normal payload/content body in the dataToSign variable.
- Then we use the content length of the UTF-8 encoded in the dataToSign variable.
- Next, we're sending the UTF-8 encoded content/payload in the API request.
- At last, we send the content length of the UTF-8 encoded in the request header.
For instance with "Stéphane Bern", I'm having a result the first time, then the second time, I'm having an HTTP 400.
Here what I'm sending:
==> POST https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest HTTP/1.1 - entity [Content-Type: application/json; charset=UTF-8,Content-Length: 185,Chunked: false] - body : {"groupId":"ZZZ","entityType":"INDIVIDUAL","providerTypes":["WATCHLIST"],"name":"Stéphane Bern","secondaryFields":[{"typeId":"SFCT_1","value":"MALE"}]} - headerGroup (request) : [Date: Thu, 23 Jan 2020 14:21:57 GMT, Authorization: Signature keyId="XXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YYY", Content-Type: application/json] - The answer : HttpResponseProxy{HTTP/1.1 400 [Transfer-Encoding: chunked, Date: Thu, 23 Jan 2020 14:12:22 GMT, X-Cnection: close, Server: ""] ResponseEntityProxy{[Chunked: true]}}
When the return is HTTP 200 :
==> POST https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest HTTP/1.1 - entity [Content-Type: application/json; charset=UTF-8,Content-Length: 185,Chunked: false] - body : {"groupId":"ZZZ","entityType":"INDIVIDUAL","providerTypes":["WATCHLIST"],"name":"Stéphane Bern","secondaryFields":[{"typeId":"SFCT_1","value":"MALE"}]} - headerGroup (request) : [Date: Thu, 23 Jan 2020 14:21:20 GMT, Authorization: Signature keyId="XXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YYY", Content-Type: application/json] - The answer : HttpResponseProxy{HTTP/1.1 200 [Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, X-XSS-Protection: 1; mode=block, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Date: Thu, 23 Jan 2020 14:13:57 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Server: ""] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Chunked: true]}}
Is there something I am missing?