For example:

String xmlString = "<root><stuff arg=\"value\"/></root>";
HttpUtils.Page page = new HttpUtils.Request("http://localhost:8080/ rest")
    .postParam("submission", "call")
    .postParam("script", xmlString)
    .retrieve();
System.out.println(page.getContent());

However, note that this is probably not the most performant, fault- tolerant, flexible, x, y, z ... way of doing the post request from the client.

Take care,

Geert

On 21 Dec 2006, at 17:33, Hynek Schlawack wrote:

Geert Bevin <[EMAIL PROTECTED]> writes:

basically, you should create a request like this:

http://localhost:8080/rest?submission=call

but then in post.

I don't know which library you're using, but this is what you'd do
with RIFE's HttpUtils (yes, by just using the RIFE jar in another
application, not necessarily a webapp):

HttpUtils.Page page = new HttpUtils.Request("http://localhost:8080/
rest")
    .postParam("submission", "call")
    .retrieve();
System.out.println(page.getContent());

I guess the question sounds stupid, but where's the script I want to
submit? I'm pretty baffled through the different possibilities now. %/

I need to submit an XML document, I'd say it's a bad idea to URL encode
it. %)

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to