how to sent file(zip) using httprequest plugin jenkins
Following Code worked for me :
def response = httpRequest(acceptType: 'APPLICATION_JSON', contentType: 'APPLICATION_ZIP', customHeaders : [[name: "authorization" , value : "${authToken}"],[name: 'x-username' , value: 'admin']], httpMode: 'POST', ignoreSslErrors: true, multipartName: '<fileName>', timeout: 900, responseHandle: 'NONE', uploadFile: "<filePath>", url: "${url}")
Looks like httprequest plugin does not support uploading zip file. This is my observation.
I think upload will use Content-Type: multipart/form-data
. But httpRequest plugin is not supporting this type. However it supports APPLICATION_OCTETSTREAM(ContentType.APPLICATION_OCTET_STREAM)
Could you post output from your curl?