com.counterclaim.openefm.client
Class HttpContentClient
java.lang.Object
com.counterclaim.openefm.client.HttpContentClient
- public class HttpContentClient
- extends java.lang.Object
-

|
Field Summary |
private static org.apache.log4j.Logger |
log
|
|
Method Summary |
static void |
main(java.lang.String[] args)
Testing driver.
|
java.lang.String |
sendContent(java.lang.String host_ip,
int port,
java.lang.String path,
java.lang.String content)
This class sends the content string to a http server and captures
the response. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.log4j.Logger log
HttpContentClient
public HttpContentClient()
sendContent
public java.lang.String sendContent(java.lang.String host_ip,
int port,
java.lang.String path,
java.lang.String content)
- This class sends the content string to a http server and captures
the response.
- Parameters:
host_ip - The ip address of the http server to post toport - The port the http server is running on, 80 normallypath - The path of the servlet / script to post tocontent - The content to deliver
- Returns:
- The response from the post
main
public static void main(java.lang.String[] args)
- Testing driver.
Note: for this to work, an insecure "portNumber" must be defined in
"etc/config.xml" as 8080. This is not normally the case, since the
admin interface is normally meant to be secure. But the HTTPClient
library doesn't handle SSL (at least not out of the box), so this needs
an insecure interface.
Copyright © 2002 counterclaim.com. All Rights Reserved.