Is there a method, or an attribute in request object that I can access to return me the URL exactly as the client requested? With the query params included?
I've checked request.build_absolute_uri
after looking at this question but it just returns the URL without the query params.
I need the URL because my API response returns the URL for the "next page" of results. I could build it from the query_params
attributes, but this view takes a lot of query params and some exclude others, so having access to the request url would save me a lot of pain.
To get full path, including query string, you want request.get_full_path()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With