Skip to content

Conversation

@vwkd
Copy link

@vwkd vwkd commented Oct 16, 2025

This adds back a headers property for setting headers, similar to the existing cookies property. For example

{
  "cmd": "request.get",
  "url": "https://httpbin.org/headers",
  "headers": [
    {"name": "X-Test", "value": "123"}
  ]
}

Test with this:

curl -s -X POST http://localhost:8191/v1 -H 'Content-Type: application/json' -d '{"cmd":"request.get","url":"https://httpbin.org/headers","headers":[{"name":"X-Test","value":"123"}]}' | jq -r '.solution.response'

(Note: Due to #165 the JSON response from the httpbin API currently gets wrapped in HTML.)

Closes #266.

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.

Add ability to set header

1 participant