PractiTest Discussion Forum

API posts requests don't accept any accent

Good afternoon,

I made some posts through Practitest API and when we put any accent in the json post in “description” or “expected-results” or “actual-results” the post request fail.

It would be possible to fix it to avoid any problems when we work in our case in french which gets accents ?

Thank you in advance for your help and your answer.

Best regards.

Hello Thomas,
Can you please provide us the exact data:

  • A request itself
  • a data sent in a request?

We’ll investigate and get back to you with the results.

Thank you,
Alex from PractiTest

Hello Alex,

For exemple if I post this json, it fails due to french accents :

{“data”: {
“type”: “instances”,
“attributes”: {
“instance-id”: id},
“steps”: {“data”:
[{ “name”: “Connexion”,
“expected-results” : “Résultat attendu connexion”,
“actual-results”: “Connexion avec succès”,
“status”: “PASSED”}]
}
}
}

I have voluntary put id instead the exact numeric value for instance-id.
When I try to post it I get an error 500 Server internal error

Thank you in advance for your help.

Best regards,

Hello Thomas,
The issue with this specific request was not the accent letters. Moreover, I can confirm that these letters can be part of any text values in API request.

The issue in this request was a different type of double quotation marks in the actual results row - both in “actual-results”, and the value itself. It is different from expected results row as well.
This type of quotation marks you’re using there comes in conflict with json format.

Please adjust the marks and let us know if the issue persists.
If it does, please send us the data again.

Additional reason for 500 error can be just a slight misconnection between our servers and yours. In this case, resending of a request should be successful.

Alex

Hello Alex,

I send you a screenshot with the double quotation used to analyze better with you, I have used the same as mentionned in API Practitest documentation and it fails.
I have tried to use simple quotation and it follows failing.

In mi screenshot I have hidden and cut the token.

Could you specify exactly what’s wrong ? → accent put in “actual-results” line for trying.

Thank you in advance for your support.

Best regards,

Thomas

Hello Thomas,
The “Bad Request” error usually leads to something incorrect with the json/request structure.

  1. Can you please once more send the full data in a json AND the request itself?
  2. Can you please try to send the request via cURL or Postman and see if the results are the same?

Thank you.

Alex from PractiTest