Skip to content

API Gateway enables interaction between services by creating REST endpoints associated with on-cluster actions. WIP.

License

Notifications You must be signed in to change notification settings

corinz/apigateway

Repository files navigation

go-api-gateway

This tool enables interaction between services by creating REST endpoints associated with pre-defined HTTP requests.

Getting Started

  1. Start server on http://localhost:8080: go run cmd/server/main.go
  2. Create a REST API myservice:
curl \
  --header "Content-Type: application/json" \
  --request POST \
  --data '{"name":"myservice"}' \
  http://localhost:8080 
  1. Create an API Endpoint myservice/testEP that makes a GET request to httpbin.org/get:
curl \
  --header "Content-Type: application/json" \
  --request POST \
  --data '{
      "Name": "testEP",
      "Description": "My EP",
      "Request": {
        "RequestVerb":"GET",
        "RequestBody":"",
        "RequestURL":"https://httpbin.org/get"
        }
      }' \
  http://localhost:8080/myservice
  1. Execute the endpoint: curl --request POST http://localhost:8080/myservice/testEP

About

API Gateway enables interaction between services by creating REST endpoints associated with on-cluster actions. WIP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published