Skip to content

Support the HTTP QUERY method in cURL import (CUE-6938) - #96

Merged
VShingala merged 1 commit into
postmanlabs:developfrom
giridharvc7:fix/CUE-6938-support-query-method
Jul 13, 2026
Merged

Support the HTTP QUERY method in cURL import (CUE-6938)#96
VShingala merged 1 commit into
postmanlabs:developfrom
giridharvc7:fix/CUE-6938-support-query-method

Conversation

@giridharvc7

@giridharvc7 giridharvc7 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Pasting a cURL command that uses the HTTP QUERY method fails to import with "The method QUERY is not supported." The same command with -X POST imports correctly.

Reported in CUE-6938. Repro:

curl 'http://localhost:3000/api/v1/my-api' -X 'QUERY' -H 'accept: application/json' --data-raw '{}'

Cause

validateCurlRequest() in src/lib.js checks the method against a hardcoded validMethods allowlist that did not include QUERY.

Change

  • Add QUERY to validMethods. QUERY is a standardized HTTP method (a safe, idempotent method that carries a request body — see RFC 9110-style QUERY).
  • Add a conversion test covering the reported repro.
  • Changelog entry under [Unreleased].

Testing

npx mocha test/conversion.test.js
# 107 passing

Generated with Claude Code

Add QUERY to the list of valid HTTP methods so that pasting a curl
command using `-X QUERY` (RFC 9110-style safe, idempotent query
method) is parsed and imported instead of failing with
"The method QUERY is not supported."

Co-Authored-By: Claude <noreply@anthropic.com>

@VShingala VShingala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@VShingala
VShingala merged commit c48c992 into postmanlabs:develop Jul 13, 2026
8 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