Google API Gateway switching from POST to GET request method

122 Views Asked by At

I am using Google API Gateway to create a route for requesting my Cloud Run instance in GCP, my config file is:

    paths:
      /dataops:
        post:
          description: "foo-bar"
          operationId: foobar
          responses:
            '200':
              description: success
          x-google-backend:
            address: https://foo-76xohajxuq-ue.a.run.app/bar/my/path/

I checked that:

  • my cloud run instance does not require authorization
  • the cloud run url works perfect when has direct access when using POST request

What is intriguing me is that when I POST to mygateway/dataops it is returning the message bellow:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <title>405 Method Not Allowed</title>
    <h1>Method Not Allowed</h1>
    <p>The method is not allowed for the requested URL.</p>

And when I look at the timeline it goes through this log: https://storage.googleapis.com/data-out/logs.txt

It says the request moved from POST to GET at some point but I can't figure out.

0

There are 0 best solutions below