Querying an API Through a Proxy
An API request can be easily routed through a proxy. Supported proxy protocols include http
, https
, socks4
, socks5
and pac
.
Let's take a look at an example.
Example​
Full Query​
api get https://pokeapi.co/api/v2/pokemon
--proxy "socks5://username:password@some-socks-proxy.com:9050"
Make an HTTP GET request to the https://pokeapi.co/api/v2/pokemon
REST API. The -proxy
flag will forward the request to the specified socks5 proxy.
NOTE: You will need to provide your own proxy service.