[GH-ISSUE #4220] [bug]: CLI cannot override content-type #1523

Closed
opened 2026-03-16 20:41:43 +03:00 by kerem · 1 comment
Owner

Originally created by @hafizahsanraza on GitHub (Jul 29, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4220

Originally assigned to: @jamesgeorge007 on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I can send a WSDL request as text/xml in app, but after exporting the test as collection and trying to execute via hoppscotch-cli, the request is always sent as application/xml and not with the header I requested. In case, if I try to specify "contentType": "text/xml" an error Please check the collection data. is thrown.

Steps to reproduce

  1. create a POST request
  2. under "Body" select application/xml and paste your XML content
  3. under "headers" add Content-Type: text/xml
  4. verify on app by sending the request if it is working fine
  5. export the test as collection
  6. execute the test with hoppscotch-cli
  7. verify on the server-side or via network tool if the text/xml is used

Environment

Production

Version

Self-hosted

Originally created by @hafizahsanraza on GitHub (Jul 29, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4220 Originally assigned to: @jamesgeorge007 on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior I can send a WSDL request as text/xml in app, but after exporting the test as collection and trying to execute via hoppscotch-cli, the request is always sent as application/xml and not with the header I requested. In case, if I try to specify `"contentType": "text/xml"` an error _Please check the collection data._ is thrown. ### Steps to reproduce 1. create a POST request 2. under "Body" select application/xml and paste your XML content 4. under "headers" add Content-Type: text/xml 5. verify on app by sending the request if it is working fine 6. export the test as collection 7. execute the test with hoppscotch-cli 8. verify on the server-side or via network tool if the text/xml is used ### Environment Production ### Version Self-hosted
kerem 2026-03-16 20:41:43 +03:00
  • closed this issue
  • added the
    bug
    cli
    labels
Author
Owner

@jamesgeorge007 commented on GitHub (Aug 8, 2024):

This is patched in Hoppscotch CLI v0.10.2. Please let us know if the issue persists. Also, text/html is added to the list of supported content types.

<!-- gh-comment-id:2276327196 --> @jamesgeorge007 commented on GitHub (Aug 8, 2024): This is patched in [Hoppscotch CLI v0.10.2](https://www.npmjs.com/package/@hoppscotch/cli/v/0.10.2). Please let us know if the issue persists. Also, `text/html` is added to the list of supported content types.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1523
No description provided.