Open alexei-28 opened 5 years ago
I just tried your examle and it works for me.
But to your error, it even tells you what you got wrong. It expects a 'User-Agent' string. This has nothing to do with restclient, it's just that you have to provide all headers they require.
After I set user agent like this:
:PRODUCTION = https://api.pro.coinbase.com
:BASE = :PRODUCTION
# Get all products(symbols/pairs)
GET :BASE/products
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
Now success get response from server from by restclient file
Why doesn't restclient send a user agent? I have found several APIs that behave strangely when a user-agent string isn't provided, and often error messages returned aren't so precise in specifying what's wrong as the one posted in the OP.
Is it possible to modify restclient to provide a defcustom
or something that would allow a default user-agent string to be set?
I has url
https://api.pro.coinbase.com/products
If I open them in Chrome server success return json. Nice.
But if I try open it via restclient like this:
I get error from server: