Warm tip: This article is reproduced from stackoverflow.com, please click
google-app-engine google-cloud-endpoints google-cloud-platform

Can I route request based on operation?

发布于 2020-03-27 10:20:44

I have an endpoint that accepts two different operations, GET and DELETE. Can I route requests to the same endpoint to different services based on operation in my dispatch.yaml?

This is how I would like to do in my dispatch.yaml:

dispatch:

  - url: "*/customer/example/uri/"
    operation:GET
    service: aservice

  - url: "*/customer/example/uri/"
    operation:DELETE
    service: anotherservice
Questioner
Calle Engene
Viewed
86
Craig 2019-07-03 22:04

No, dispatch.yaml can only route based on url.