Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65364

ability to read response headers on httpRequest plugin

    • Icon: New Feature New Feature
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • http-request-plugin
    • None

      Currently, seems that using httpRequest plugin we are unable to read custom response headers, it would be nice to be able to.

      Use case: some services return paginated responses, and they provide an http response header (link) where, if available, there's another url to obtain the next page of results.

          [JENKINS-65364] ability to read response headers on httpRequest plugin

          Jozsef Kozell added a comment -

          juanpablo,

          The plugin returns a class called ResponseContentSupplier. This class has a method called getHeaders() which returns all the HTTP headers found in the response.

          Jozsef Kozell added a comment - juanpablo , The plugin returns a class called  ResponseContentSupplier . This class has a method called getHeaders() which returns all the HTTP headers found in the response.

          kozell thanks for the tip! indeed I was able to retrieve the headers that way. Closing the issue as the feature is already present.

          Juan Pablo Santos Rodríguez added a comment - kozell thanks for the tip! indeed I was able to retrieve the headers that way. Closing the issue as the feature is already present.

          Rich added a comment -

          juanpablo kozell I have similar requirement. Can you provide me hints on how to prepare the httprequest call to be able to read response header ? Is there any example provided on how to read ResponseContentSupplier ?

          Rich added a comment - juanpablo kozell I have similar requirement. Can you provide me hints on how to prepare the httprequest call to be able to read response header ? Is there any example provided on how to read ResponseContentSupplier ?

            janario Janario Oliveira
            juanpablo Juan Pablo Santos Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: