hugokernel/micropython-nanoweb

GET and POST methods?

Closed this issue · 3 comments

How to use GET method with parameters and POST method?
Any example to implement http methods?

You can do that by accessing request method attribute.

async def only_get_method(request):
    if request.method != "GET":
        raise HttpError(request, 501, "Not Implemented")

Can you provide a demo using GET and POST? That will be helpful

Sorry for the late reply.

I will add more examples when I have time.