Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
AJZ
Partner - Contributor II
Partner - Contributor II

REST: Handle non-ascii character in header

Hi!

I have a problem with the REST connector where the authorization is set in the query header parameter.

I get the error message Failed to connect to server Request headers must contain only ASCII characters. because there is the character å in the header. 

It works in Postman but not in Qlik. I have tried to change å to be html-encoded (both %C3%A5 and %E5) but it doesn't work. 

Is there a way around this or should we just change the header parameter to not contain this character?

Best Regrads,
Adam J.

Labels (1)
1 Solution

Accepted Solutions
AJZ
Partner - Contributor II
Partner - Contributor II
Author

Thanks for your reply, I tried it and it didn't work but we changed the parameter so it's working now!

/Adam J.

View solution in original post

2 Replies
williejacobs
Creator
Creator

Hi Adam,

I suggest you run you query with the "With Connection" option and then create your header as a variable.

eg.
Let zHeader = 'somedata'&Chr(229)

apiData:
Select *
FROM JSON (wrap on) "root"
With Connection
(URL "https://api.com",
HTTPHEADER "zHeader"
);

AJZ
Partner - Contributor II
Partner - Contributor II
Author

Thanks for your reply, I tried it and it didn't work but we changed the parameter so it's working now!

/Adam J.