Add a command that allows us to interact with the details of the previous request we made, rather than just the response.
In the requests library, we can make use of the request attribute of a response object as such:
r = requests.get(url)
print(r.request.headers)
{'Accept-Encoding': 'identity, deflate, compress, gzip',
'Accept': '*/*', 'User-Agent': 'python-requests/1.2.0'}
This can either be lumped into the response command as such:
> response show request
...
or potentially made into its own command request.
Add a command that allows us to interact with the details of the previous request we made, rather than just the response.
In the
requestslibrary, we can make use of therequestattribute of a response object as such:This can either be lumped into the
responsecommand as such:or potentially made into its own command
request.