- Daniel Ferrreira
- PowerBuilder
- Monday, 15 March 2021 03:28 PM UTC
Hello folks,
I'm calling a woocommerce API using PB REST Client. Using Postman it works, but when calling from PB (2019 R3 Build 2670), I get return code -14 (Code conversion failed).
I think it has to do with the headers, but I'm not being able to pin point what. Any advice? These are the prints for Postman and also my PB Script.
Thanks a lot.
iClientApi.ClearRequestHeaders()
iClientApi.SetRequestHeader('Authorization', 'Basic ' + is_authorization)
iClientApi.SetRequestHeader('Accept', '*/*')
iClientApi.SetRequestHeader('Accept-Encoding', 'gzip, deflate, br')
iClientApi.SetRequestHeader('Content-Encoding', 'br')
iClientApi.SetRequestHeader('Content-Type', 'application/json; charset=UTF-8')
iClientApi.SetRequestHeader('Connection', 'keep-alive')
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.