- From: Rajesh Chawla <rajesh@herndon.xes.xerox.com>
- Date: Tue, 16 Sep 1997 07:24:34 PDT
- To: www-jigsaw@w3.org
Hi folks,
I'm trying to use the Jigsaw HTTP classes in a
client to implement the IPP protocol that uses HTTP 1.1
as a transport layer.
What I want to do is to send a request with these parameters:
method: Post
Mimetype: application/ipp
URL: /ipp/testing
Data in Request: "Testing from Rajesh"
Is the following code the correct way to do this, or am
I missing stuff?
HttpManager manager = HttpManager.getManager() ;
Request request = manager.createRequest() ;
request.setContentType (new MimeType ("application", "ipp"));
request.setMethod ("POST");
request.setURL(new URL("http://orion:2000/ipp/testing"));
String dataToSend;
dataToSend = new String("Testing from Rajesh");
ByteArrayInputStream inByte;
inByte = new ByteArrayInputStream (dataToSend.getBytes());
request.setOutputStream (inByte);
Reply reply = manager.runRequest(request) ;
Regards,
Rajesh
Received on Tuesday, 16 September 1997 10:25:09 UTC