Stoobly / stoobly-agent

Record, mock, and test HTTP/HTTPS requests. CLI agent for Stoobly.
Other
6 stars 0 forks source link

Update 'request response get' command to return a valid string #107

Closed stoobmmelier closed 1 year ago

stoobmmelier commented 1 year ago

Resolves https://github.com/Stoobly/stoobly-agent/issues/101

.text is to return the content of the server's response with an educated guess on the encoding from the HTTP headers. Whereas .content is for the response body as bytes

Before the bug fix:

$ stoobly-agent request response get REQUEST_ID

b'[{"key":"val"},{"key2":"val2"}]'

After the bug fix:

$ stoobly-agent request response get REQUEST_ID

[{"key":"val"},{"key2":"val2"}]