You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/17 19:08:01 UTC
[GitHub] akrabat opened a new issue #257: Invalid method returns 404 not 405
akrabat opened a new issue #257: Invalid method returns 404 not 405
URL: https://github.com/apache/incubator-openwhisk-apigateway/issues/257
Given an API Gateway set up to only accept GET, if I try to POST to it, I get a `404` back.
I should get a [`405`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405) as the resource exists (i.e. was found), but I'm not allowed to access it with this method.
```
$ wsk api create /hello / GET hello
ok: created API /hello/ GET for action /_/hello
https://service.eu.apiconnect.ibmcloud.com/gws/apigateway/api/d12...b12/hello/
$ curl -I -X POST https://service.eu.apiconnect.ibmcloud.com/gws/apigateway/api/d12..b12/hello
HTTP/1.1 404 Not Found
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Date: Sun, 17 Sep 2017 19:07:37 GMT
Server: openresty
Content-Length: 62
{"status":404,"message":"Error: Whoops. Verb not supported."}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services