squeaky-pl / japronto

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.
MIT License
8.61k stars 581 forks source link

how to get url parameters?? like if a url is 127.0.0.1:8000/api/books?query=jason, how to get the query param in japronto? #120

Open spawn08 opened 6 years ago

ATLUSio commented 6 years ago

GitHub issues generally aren't for general "how to" questions, but rather for actual "issues" causing problems with the product.

With that being said, taking a look at the examples and doing some research on your own can yield great results. I'll help you get started. Take a look at this line in particular. The top of this example states how to handle the query params, so you should be able to work from there.

If you have any further questions, you should consider posting the question in a more suitable place like Stack Overflow.

vadim-shadrin commented 6 years ago

def getQueryString(request):

              url_params = request.query_string
geyang commented 6 years ago

@ATLUSio There is currently no stack overflow question and answers about this library. There doesn't seem to be a critical mass of users there.

See search link here: https://stackoverflow.com/search?q=japronto

ATLUSio commented 6 years ago

That's true, but this is still GitHub issues and should be treated seriously for triaging issues. Even if there doesn't seem to be a critical mass of users with Japronto questions, there's still very many people very willing to answer Python-related questions.

Furthermore, the how-to request of this GitHub is covered in this example (which is why I suggested looking through the examples): https://github.com/squeaky-pl/japronto/blob/master/examples/4_request/request.py