Closed ushaheu closed 7 years ago
I have two services:
http://services.groupkt.com/state/get/{countryCode}/all
https://restcountries.eu/rest/v2/all
The first api is not secured. The second api is secured. Please I need urgent HELP on how to add these apis on KONG, forward them through KONG and then send requests.
From the documentation, adding api is achieved using this:
curl -i -X POST \ --url http://localhost:8001/apis/ \ --data 'name=example-api' \ --data 'hosts=example.com' \ --data 'upstream_url=http://httpbin.org'
But I cannot seem to get it work for my apis since when i try to forward the request through KONG using
curl -i -X GET \ --url http://localhost:8000/ \ --header 'Host: example.com'
it tells me "message":"no API found with those values". Please i need help to identify what is my upstream url and hosts for both services.
I am using KONG v0.10.x
We got that working changing hosts to the domain of the upstream url, in your case: httpbin.org
Summary
I have two services:
http://services.groupkt.com/state/get/{countryCode}/all
https://restcountries.eu/rest/v2/all
The first api is not secured. The second api is secured. Please I need urgent HELP on how to add these apis on KONG, forward them through KONG and then send requests.
From the documentation, adding api is achieved using this:
curl -i -X POST \ --url http://localhost:8001/apis/ \ --data 'name=example-api' \ --data 'hosts=example.com' \ --data 'upstream_url=http://httpbin.org'
But I cannot seem to get it work for my apis since when i try to forward the request through KONG using
curl -i -X GET \ --url http://localhost:8000/ \ --header 'Host: example.com'
it tells me "message":"no API found with those values". Please i need help to identify what is my upstream url and hosts for both services.
I am using KONG v0.10.x