Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressed bug where recording requests does not save headers to file. Closes #715 #720

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

TheJacobWalters
Copy link
Contributor

@TheJacobWalters TheJacobWalters commented May 25, 2024

I have made a working solution here.

I would welcome feedback on how I can improve this.

I left some comments in my code explaining the main issue I was overcoming. Which is that the headers field of the Request is a unique data structure called ValueView. Writing this data structure to a YAML file created a lot of strange "Tag" artifacts in the file. Therefore I decided that I would need to coerce the data structure into a standard type of Dict. That was harder than I expected and I ended up just parsing the string representation of the ValueView into a Dict. There is probably a better way to do this but I don't know what it is yet.

When this MR is ready to move off of Draft, I can remove those comments.

@TheJacobWalters TheJacobWalters marked this pull request as draft May 25, 2024 19:59
@TheJacobWalters TheJacobWalters changed the title Addressed issue 715 Addressed issue 715 Closes #715 May 25, 2024
@TheJacobWalters TheJacobWalters changed the title Addressed issue 715 Closes #715 Addressed bug where recording requests does not save headers to file. Closes #715 May 25, 2024
responses/_recorder.py Show resolved Hide resolved
responses/_recorder.py Outdated Show resolved Hide resolved
@TheJacobWalters TheJacobWalters marked this pull request as ready for review June 9, 2024 14:26
@markstory markstory merged commit b0573d2 into getsentry:master Jun 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants