HTTP Post without header

Hi,

is it possible to post a RAW request using pub.client:http service ?
normally a default header is added :

POST / HTTP/1.0
User-Agent: Mozilla/4.0 [en] (WinNT; I)
Accept: image/gif, /
Host:
Authorization: Basic Og==
Content-type: application/x-www-form-urlencoded
Content-Length: 50

can this be left out easily ? if not, what is the alternative ?

thx,
Oliver.

No, it’s not possible. What you’re asking for is not an HTTP request but a simple TCP connection like the one provided by ‘telnet’.

To do what you want, you can write a simple Java service - it should just take a few lines. The service would need 3 inputs: an object (data bytes), remote server address, remote server port. All you have to do is open a TCP socket to the remote endpoint and write the data out to it.

Hi Sonam,

thx for the reply.
Can you give me an example how to build that Java Service. I’m not very experienced with it.

thx,
Oliver.

Sorry I didn’t reply earlier Oliver.

My Java is rusty, so I won’t give you code. However, writing a Java service isn’t difficult. Make sure you import java.io.* in the imports tab for the Java service. What you will be doing is called ‘socket programming’ and the techniques shown here should suffice:
[url=“http://www.oreilly.com/catalog/javaio/chapter/ch05.html#28144”]http://www.oreilly.com/catalog/javaio/chapter/ch05.html#28144[/url]

This page showed when I googled for “import java.io.* network connection”