Run Postman with Hebrew Headers

I’m doing some API tests with postman, using POST request. The site I’m testing uses Headers, and two of the values are in Hebrew letters.
I looked here, and found some tips how to use hebrew:

  1. In the Pre-request I set the values encoded, then set it into the Headers (with function I created).
    pm.environment.set(“name”, “%D7%A9%D7%9C%D7%95%D7%9D”)
    pm.environment.set(“lastName”, “%D7%9B%D7%94%D7%9F”)
  2. I also tryed:
    pm.environment.set(“name”, unescape(encodeURIComponent(“שלום”)))
    pm.environment.set(“lastName”, unescape(encodeURIComponent(“כהן”)))
  3. I played with the other Headers, like adding:
    Accept-Language: he-IL,he;q=0.9,en-US;q=0.8,en;q=0.7

But the request keep returns with error 500.
I feel I’m missing something here, does anyone know how can It work??

Thank you,
Avivit

Hi @avivit-h,

Welcome to the community! :clap:

This is an interesting use case, and one to likely have challenges. For starters, it looks like the way you did things in 1 should work, as you are utf encoded versions of the hebrew strings. As for adding Accept-Language headers, I am not sure how much that will help as thats likely dependent on if the endpoint interprets the header into something meaning.

As for your return error, do you get any context behind the issue? Is there a response body that describes the error more? Information like that can help troubleshoot.

Are you certain the end server can handle hebrew encoded characters? It might be useful to also check your request and be sure they are being encoded properly. Do the hebrew characters show up in Postman as expected?

This should give you a good place to start in figuring out the issue.