hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preeti Parameswaran <ppara...@tibco.com>
Subject adding Mime-Version before the body
Date Thu, 11 Jul 2013 16:12:10 GMT
Hello

I am new to Http Client, and I tried reading through your archives.
I would like to know if the "Mime-version:1.0" and "ContentType" header can be added just
before the request body as specified in RFC 2045 using HttpClient 4.2.5

Here is what my code produces

POST http://localhost:7999/ HTTP/1.1
Content-Type: multipart/related; boundary="--[B@2a9df354"
Connection: close
Mime-Version: 1.0
Content-Length: 278227
Host: localhost:7999
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.2.5 (java 1.5)

----[B@2a9df354
Content-Disposition: form-data; name="Soapmessage@pxd.com"
Content-Type: text/xml;charset=utf-8;; charset=US-ASCII
Content-Transfer-Encoding: 8bit

test
----[B@2a9df354
Content-Disposition: form-data; name="USAHI0965913PR830124.pdf"; filename="USAHI0965913PR830124.pdf"
Content-Type: application/pdf
Content-Transfer-Encoding: binary

Here is what I would need


POST http://localhost:7999/ HTTP/1.1
Content-Type: multipart/related; boundary="--[B@2a9df354"
Connection: close
Mime-Version: 1.0
Content-Length: 278227
Host: localhost:7999
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.2.5 (java 1.5)

Mime-Version: 1.0
Content-Type: multipart/related; boundary="--[B@2a9df354"


----[B@2a9df354
Content-Disposition: form-data; name="Soapmessage@pxd.com"
Content-Type: text/xml;charset=utf-8;; charset=US-ASCII
Content-Transfer-Encoding: 8bit

test
----[B@2a9df354
Content-Disposition: form-data; name="USAHI0965913PR830124.pdf"; filename="USAHI0965913PR830124.pdf"
Content-Type: application/pdf
Content-Transfer-Encoding: binary

Regards,
Preeti Parameswaran
TIBCO PSG, NA
614-271-7596
pparames@tibco.com


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message