com.axiomalaska.sos.tools
Class HttpSender
java.lang.Object
com.axiomalaska.sos.tools.HttpSender
public class HttpSender
- extends java.lang.Object
This class is a Helper for interfacing with servers with HTTP.
- Author:
- Lance Finfrock
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpSender
public HttpSender()
sendPostMessage
public java.lang.String sendPostMessage(java.lang.String serviceURL,
java.lang.String message)
throws java.io.IOException
- Send a HTTP post message
- Parameters:
serviceURL - - the URL to send the post messagemessage - - the message to send to the URL
- Returns:
- the response from the post message sent
- Throws:
java.io.IOException
sendGetMessage
public java.lang.String sendGetMessage(java.lang.String urlText)
throws java.io.IOException
- Throws:
java.io.IOException
sendGetMessage
public java.lang.String sendGetMessage(java.lang.String serviceURL,
java.util.List<HttpPart> httpParts)
throws java.lang.Exception
- Throws:
java.lang.Exception
sendPostMessage
public java.lang.String sendPostMessage(java.lang.String serviceURL,
java.util.List<HttpPart> httpParts)
throws java.lang.Exception
- Throws:
java.lang.Exception
doesUrlExists
public boolean doesUrlExists(java.lang.String serviceURL)
downloadReadFile
public java.lang.String downloadReadFile(java.lang.String url)
throws java.lang.Exception
- Throws:
java.lang.Exception
downloadFile
public java.lang.String downloadFile(java.lang.String fileUrl)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2012. All Rights Reserved.