def get_request_value(request, key, default=None):
if request.method in ['<STR_LIT:GET>', '<STR_LIT>']:<EOL><INDENT>return request.query_params.get(key, request.data.get(key, default))<EOL><DEDENT>return request.data.get(key, request.query_params.get(key, default))<EOL>
Get the value in the request, either through query parameters or posted data, from a key.

:param request: The request from which the value should be gotten.
:param key: The key to use to get the desired value.
:param default: The backup value to use in case the input key cannot help us get the value.
:return: The value we're looking for.