Skip to content

Access to HTTP output headers #1203

Closed

Description

@fjtirado

What would you like to be added?

Right now, there is no way to access headers in a http response (note that there is already well defined way to specify http request headers)

Proposal(s):

I would like to propose the addition of a jq variable (using a really original name: headers) so users can optionally merge them into the task response by including an expression containing $header in the output as filter.

Alternative(s):

Include an output headers property in the existing with parameters, with the list of headers to be included in the response (the problem of that approach is that it is a bit rigid, you probable need the output filter later anyway)

Additional info:

No response

Community Notes

  • Please vote by adding a 👍 reaction to the feature to help us prioritize.
  • If you are interested to work on this feature, please leave a comment.

Activity

  1. self-assigned this
    on Nov 4, 2026
  2. added this to the v1.1.0 milestone on Nov 4, 2026
  3. fjtirado commented on Nov 5, 2026

    @fjtirado
    CollaboratorAuthor

    Closing since already covered by http output
    Thanks @ricardozanini for pointing out this.

  4. ricardozanini commented on Nov 5, 2026

    @ricardozanini
    Collaborator

    Hi @fjtirado,

    Accessing HTTP response headers is already supported in the specification by setting output: response under with in an HTTP (or OpenAPI) call task.

    When with.output: response is specified, the task produces the full HTTP Response object (request, statusCode, headers, content) as the raw task output (.). You can then use output.as or export.as to project the content and headers into the task output or workflow context as needed:

    do:
      - getPet:
          call: http
          with:
            method: get
            endpoint: https://petstore.swagger.io/v2/pet/{petId}
            output: response
          output:
            as:
              pet: .content
              headers: .headers

    We opened PR #1205 to clarify this in dsl-reference.md, add an explicit example (examples/call-http-output-headers.yaml), and include a CTK test scenario covering this pattern.

  5. ricardozanini commented on Nov 5, 2026

    @ricardozanini
    Collaborator

    I'm reopening the issue, so we add a PR to clarify this matter for future reference.

  6. fjtirado commented on Nov 5, 2026

    @fjtirado
    CollaboratorAuthor

    Reopening to add examples using this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

change: featureNew feature or request. Impacts in a minor version changetype: feature

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions