About WsgiApp with CORS


#1

From @lagelalegal on Wed Sep 13 2017 03:56:36 GMT+0000 (UTC)

Now, we use http decorator only support one method.

@http('GET', '/hello')
def xxxx(self, request):
    pass

Why I need multiple methods support?

Because of that I use put or post method in browser, It have a default method with ‘options’ been caused.

It’s base on CORS.

Copied from original issue: https://github.com/nameko/nameko/issues/471


#2

From @davidszotten on Wed Sep 13 2017 08:06:43 GMT+0000 (UTC)

it’s not very well documented yet unfortunately, but did you know that the following is currently possible:

    @http('GET', '/multiple')
    @http('POST', '/multiple')
     def method(self, request):
         return 200, request.method