Skip to content

Fix Quickstart docs: compare form data with .json() not .text - #7224

Closed
thakoreh wants to merge 1 commit into
psf:mainfrom
thakoreh:fix-quickstart-docs-comparison
Closed

Fix Quickstart docs: compare form data with .json() not .text#7224
thakoreh wants to merge 1 commit into
psf:mainfrom
thakoreh:fix-quickstart-docs-comparison

Conversation

@thakoreh

Copy link
Copy Markdown

Fixes #6949

Problem

The Quickstart documentation shows that r1.text == r2.text returns True when comparing two POST requests with the same form data. However, httpbin.org responses include a dynamic X-Amzn-Trace-Id header which makes this comparison return False.

Solution

Changed the comparison to use .json()['form'] which correctly compares only the form data.

The httpbin.org response includes a dynamic X-Amzn-Trace-Id header
which makes r1.text == r2.text return False even when the form data
is identical. Changed the comparison to use .json()['form'] which
correctly compares only the form data.

Fixes: psf#6949
@nateprewitt
nateprewitt force-pushed the fix-quickstart-docs-comparison branch from dfc6910 to 438c71a Compare March 3, 2026 19:07
@nateprewitt

Copy link
Copy Markdown
Member

Resolving as duplicate of #6960.

@nateprewitt nateprewitt closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants