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')
Fortunately woocommerce API accepts gzip, so it worked! There's an interesting issue that my calls to other e-commerce are using SetRequestHeader('Accept-Encoding', 'gzip, deflate, br'), but this is the first time using Content-Encoding. But using both as gzip has worked, thanks a lot!