Skip to content

Latest commit

 

History

History
69 lines (38 loc) · 1.51 KB

README_VERBS.md

File metadata and controls

69 lines (38 loc) · 1.51 KB

GET

API Gateway Swagger

HEAD

API Gateway Swagger

GET with Params

API Gateway Swagger

You can specify your entire route in the parameters query string param.

eg. you may want to hit

GET http://localhost:63990/student/{year}/subject/{code}?division={division}

route on the back end API.

You will set up the Orchestration as

orchestrator.AddApi("schoolservice", "http://localhost:63990/")
                    .AddRoute("year-subject", GatewayVerb.GET, new RouteInfo { Path = "student/" });

And call the GET endpoint as

API Gateway Swagger

Or

Parameterized route

You will set up a parameterized route in the Orchestration as

orchestrator.AddApi("schoolservice", "http://localhost:63990/")
                    .AddRoute("year-subject", GatewayVerb.GET, new RouteInfo { Path = "student/{year}/subject/{code}?division={division}" })

And call the GET endpoint as

API Gateway Swagger

Any param in the Path (eg. {year}) will be substituted by what is passed in the Parameters field in the request.

So, the Path would become student/2020/subject/001?division=A.

POST

API Gateway Swagger

PUT

API Gateway Swagger

PATCH

API Gateway Swagger

DELETE

API Gateway Swagger

GET Orchestration

API Gateway Swagger