Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
39.12k stars 4.8k forks source link

HELP!! #2221

Closed ushaheu closed 7 years ago

ushaheu commented 7 years ago

Summary

I have two services:

  1. http://services.groupkt.com/state/get/{countryCode}/all

  2. 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

sterling-max commented 7 years ago

We got that working changing hosts to the domain of the upstream url, in your case: httpbin.org