Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
terryyang
Explorer
0 Kudos

[Why raising this question?]

Recently, I was testing restful webservice SDK to get logon-token. However, in my own laptop, for example, /biprws/logon/long always returned {"error_code":"RWS 00070","message":"Internal server error. (RWS 00070)"} in my javascript.

I got stuck in this problem for a long time because according to documentations, what I should add to header are

"Accept":"application/json"

"Content-Type":"application/json"

Testing by Postman, everything was good...

After I copying my codes to a machine which only English supported, the codes were working well! After I changing the language setting of my laptop, magically, the codes were working as well!

[Resolution]

Working request header:


Non-working request header:

Compared working network traffic to non-working network traffic, I found only "Accept-Language" is strongly related to this issue. So, I added another request header "Accept-Language" in my code:


headers:  {
"Accept": "application/json",
"Access-Control-Allow-Origin":"*",
"Accept-Language":"en-US"
}



Then, OK now.

After adding the header, network traffic showed the request returned 200

And, the request header was:

And token got.

[Summary]

For non-EN IE user, "Accept-Language":"en-US" is really really important. Otherwise, such issue may make you confused for a long time.