Skip to content

fix(snippetz): send the body in python examples for json media types and text bodies - #10497

Merged
hanspagel merged 2 commits into
scalar:mainfrom
charan-rathore:fix/snippetz-python-json-media-types
Oct 6, 2026
Merged

hanspagel merged 2 commits into
scalar:mainfrom
charan-rathore:fix/snippetz-python-json-media-types

Conversation

@charan-rathore

@charan-rathore charan-rathore commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The Python Requests and HTTPX examples omit bodies for application/json; charset=utf-8, application/vnd.api+json, and text types such as text/plain or application/xml.

Use isJsonMediaType to recognize JSON media types and include other text bodies. Requests uses data= for raw text; HTTPX uses content=. HTTPX GET, DELETE, HEAD and OPTIONS requests with bodies use .request(...), because those convenience methods do not accept body arguments. This applies to sync and async HTTPX examples.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@changeset-bot

changeset-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 572f006

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@scalar/snippetz Patch
@scalar/java-integration Patch
@scalar/api-client Patch
@scalar/api-reference Patch
@scalar/blocks Patch
@scalar/workspace-store Patch
@scalar/nuxt Patch
@scalar/agent-chat Patch
@scalar/api-client-react Patch
scalar-app Patch
@scalarapi/docker-api-reference Patch
@scalar/aspire Patch
@scalar/aspnetcore Patch
@scalar/aws-lambda Patch
@scalar/azure-functions Patch
@scalar/fastify-api-reference Patch
scalar_api_reference Patch
@scalar/api-reference-react Patch
@scalar/server-side-rendering Patch
@scalar/mock-server Patch
@scalar/oas-utils Patch
@scalar/openapi-to-markdown Patch
@scalar/pre-post-request-scripts Patch
@scalar/sidebar Patch
@scalar/mock-server-docker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hanspagel
hanspagel force-pushed the fix/snippetz-python-json-media-types branch from f272c7d to 572f006 Compare October 6, 2026 09:31
@hanspagel
hanspagel temporarily deployed to production-netlify October 6, 2026 09:34 — with GitHub Actions Inactive
@hanspagel
hanspagel temporarily deployed to production-netlify October 6, 2026 09:34 — with GitHub Actions Inactive
@hanspagel
hanspagel temporarily deployed to production-netlify October 6, 2026 09:34 — with GitHub Actions Inactive
@hanspagel
hanspagel temporarily deployed to production-netlify October 6, 2026 09:34 — with GitHub Actions Inactive
@hanspagel
hanspagel temporarily deployed to production-netlify October 6, 2026 09:34 — with GitHub Actions Inactive
@hanspagel
hanspagel merged commit 8337c03 into scalar:main Oct 6, 2026
33 checks passed
@charan-rathore
charan-rathore deleted the fix/snippetz-python-json-media-types branch October 6, 2026 09:46
@scalar-release-bot scalar-release-bot Bot mentioned this pull request Oct 6, 2026

This branch was previously deployed

1 inactive deployment
production-netlify — 572f0068 Deployed Oct 6, 2026 by hanspagel via test-e2e-scalar-app #3207
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