Reputation: 277
I have a GET request with an endpoint looking like this:
I know I can reach individual values with the key, but how do I capture ALL values in one variable?
I've tried it like this but nothing is captured at all:
followers = self.request.query_params.get('')
Upvotes: 0
Views: 115
Reputation: 32244
self.request.GET
Is a dictionary-like object that contains all query parameters
It is immutable (can't be edited) but you can create a copy if you need a mutable object:
data = self.request.GET.copy()
Upvotes: 1