Custom http post
Hej Eksperter!Jeg i en applikation, som bland andet sender transport instruktioner til vores transportør. Dette sendes via http protokollen. Vores transportør forventer at modtage et http post, som ser ud som nedenstående:
POST /hapld/tos/kdwapltos HTTP/1.1<cr/lf>
Host: www.pld-certify.ups.com<cr/lf>
Content-type: multipart/mixed; boundary=BOUNDARY<cr/lf>
Content-length: 1040<cr/lf>
<cr/lf>
--BOUNDARY<cr/lf>
Content-type: application/x-www-form-urlencoded<cr/lf>
Content-length: 140<cr/lf>
<cr/lf>
AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=useridvalue&Password=passwordvalue<cr/lf>
<cr/lf>
--BOUNDARY<cr/lf>
Content-type: application/x-ups-binary<cr/lf>
Content-length: 719<cr/lf>
<cr/lf>
TRANSPORT_INSTRUCTION_MESSAGE<cr/lf>
<cr/lf>
--BOUNDARY--<cr/lf>
Findes der klasser i .NET, som gør at jeg kan konstruere en besked som dette?
Det skal siges, at det af andre årsager endnu ikke er bestemt om denne applikation skal udarbejdes i C# eller Java. Just in case nogen skulle snuble over et meget lignende indlæg under Java :D