-
Improvement
-
Resolution: Won't Do
-
Minor
-
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.
[JENKINS-40043] Allow custom values for Content-Type Header in Pipelines
Description |
Original:
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 a killer for the plugin usage*, 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 not possible. When I do not set the {{contentType}} parameter, the request arrives at the server with contentType {{text/plain; charset=ISO-8859-1}}. *Therefore I cannot use the http-request plugin and have to use wget via shell instead.* To remove such limitations and increase plugin usage, 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. |
New:
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. |
Priority | Original: Major [ 3 ] | New: Minor [ 4 ] |
Resolution | New: Won't Do [ 10001 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |