Fix inaccurate OPTIONS method example by Khogendrarupini · Pull Request #46220 · mdn/content · GitHub
Skip to content

Fix inaccurate OPTIONS method example - #46220

Closed
Khogendrarupini wants to merge 3 commits into
mdn:mainfrom
Khogendrarupini:fix-options-method
Closed

Khogendrarupini wants to merge 3 commits into
mdn:mainfrom
Khogendrarupini:fix-options-method

Conversation

@Khogendrarupini

Copy link
Copy Markdown
Contributor

Description

Updated the "Identifying allowed request methods" section in the HTTP OPTIONS method documentation to use https://httpbin.org instead of https://example.org. Updated the illustrative HTTP response and clarified that response status codes and headers depend on the server's implementation and configuration.

Motivation

The previous example showed a 204 No Content response and an Allow header that could not be reproduced using the documented curl command against https://example.org. This change uses an alternative endpoint to make the example clearer and removes the outdated response details.

Additional details

Only the "Identifying allowed request methods" section in files/en-us/web/http/reference/methods/options/index.md was changed. No unrelated documentation files were modified.

Related issues and pull requests

Fixes #46204

@Khogendrarupini
Khogendrarupini requested a review from a team as a code owner October 21, 2026 05:08
@Khogendrarupini
Khogendrarupini requested review from hamishwillee and removed request for a team October 21, 2026 05:08
@github-actions github-actions Bot added Content:HTTP HTTP docs size/s [PR only] 6-50 LoC changed labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@Khogendrarupini Khogendrarupini left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied the suggested Markdown formatting change to address the linter feedback. No changes were made to the technical content...

… OPTIONS

Description

Updated the "Identifying allowed request methods" section of the HTTP OPTIONS method documentation to use https://httpbin.org instead of https://example.org. Updated the illustrative HTTP response to reflect the example provided in issue mdn#46204, showing an HTTP/2 200 response with an Allow: HEAD, OPTIONS, GET header. Clarified that response status codes and headers depend on the server's implementation and configuration.

Also applied the suggested Markdown formatting change from the pull request review.

Motivation

The original example showed a 204 No Content response and an Allow header, but the documented curl command against https://example.org returns 405 Method Not Allowed without an Allow header, as reported in issue mdn#46204. This made the example inaccurate and potentially confusing for readers.

Using https://httpbin.org aligns the example with the response reported in the issue and demonstrates how an OPTIONS request can return an Allow header listing supported request methods.

Additional details

Only the "Identifying allowed request methods" section in files/en-us/web/http/reference/methods/options/index.md was updated, along with the Markdown formatting adjustment requested during review. No unrelated documentation files were changed.

Related issues and pull requests

Fixes mdn#46204
- [HTTP headers](/en-US/docs/Web/HTTP/Reference/Headers)
- {{HTTPHeader("Allow")}} header
- [CORS](/en-US/docs/Web/HTTP/Guides/CORS)
-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change

… OPTIONS

Description

Updated the "Identifying allowed request methods" section of the HTTP OPTIONS method documentation to use https://httpbin.org instead of https://example.org. Updated the illustrative HTTP response to reflect the example provided in issue mdn#46204, showing an HTTP/2 200 response with an Allow: HEAD, OPTIONS, GET header. Clarified that response status codes and headers depend on the server's implementation and configuration.

Also applied the suggested Markdown formatting change from the pull request review.

Motivation

The original example showed a 204 No Content response and an Allow header, but the documented curl command against https://example.org returns 405 Method Not Allowed without an Allow header, as reported in issue mdn#46204. This made the example inaccurate and potentially confusing for readers.

Using https://httpbin.org aligns the example with the response reported in the issue and demonstrates how an OPTIONS request can return an Allow header listing supported request methods.

Additional details

Only the "Identifying allowed request methods" section in files/en-us/web/http/reference/methods/options/index.md was updated, along with the Markdown formatting adjustment requested during review. No unrelated documentation files were changed.

Related issues and pull requests

Fixes mdn#46204

@BHUVANSH855 BHUVANSH855 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is duplicate of #46206.

@Josh-Cena Josh-Cena closed this Oct 21, 2026
@Khogendrarupini
Khogendrarupini deleted the fix-options-method branch October 22, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect example for curl -X OPTIONS

4 participants