Error during API service: Error: Download (3): Error transferring data "http://openAPI.seoul.go.kr:8088/sample/xml/LOCALDATA_030601_SP/1/2/": Unrecognized or bad HTTP Content or Transfer- Encoding
But, It works fine in browsers.
How can I solve this problem?
Solved! Go to Solution.
I currently don’t have Alteryx in front of me, so can’t test this to be 100% certain.
It may be that you need to make the request in the download tool with something that makes the receiving service think it’s coming from a browser. The way you do this is in the download tool add
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0
where User-Agent goes in the name and everything after the : in the value.
The other one worth including is
Accept: application/xml
Typically with API calls I use a third party tool called Postman to test the call first and that will provide example scripts for the curl request which shows if there are any other headers etc that you need to include.
Thank you very much for your interest.
I have installed and used Postman you suggested, but nothing has changed yet.
I'm looking for an alternative way to get data using Python.
However, it would be nice to be able to solve the problem within Alteryx Desktop if possible.
Hi @lsmrevo
I had a hard time trying to do this just with Alteryx, the problem for me seems to be related with encoding.
Anyway, with Python the solution seems much more simple and without this problem. Take a look at the attached workflow.
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.
Thanks to you, the problem was solved.
However, I still expect the default functionality of Alteryx Desktop to work normally.