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

Allow custom values for Content-Type Header in Pipelines

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • http-request-plugin
    • Jenkins 2.7.3, http-request 1.8.12

      When I use the http-request plugin in a pipeline, the page https://jenkins.io/doc/pipeline/steps/http_request/ lists the possible values for the optional headers contentType and acceptType.

      The fixed list of (very few) types is not very helpful, because there is (for example) no value for XML data (text/xml or application/xml). In addition the content-type cannot contain any charset information when it contains only the mime-type.

      I would like to set a content-type like text/xml; charset=UTF-8 which is currently only possible by using the customHeaders parameter.

      It would probably be better to allow any string as contentType. There are so many mime-types and charsets available, I don't think this can be limited to an Enumeration.

            janario Janario Oliveira
            burki Stephan Burkard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: