public class HttpHandler extends Object
| Constructor and Description |
|---|
HttpHandler() |
| Modifier and Type | Method and Description |
|---|---|
String |
doGet(String url,
String trackingCode,
String appmSamlSsoTokenId,
String refer)
This method is used to do a http get request
|
String |
doPostHttp(String url,
String payload,
String sessionId,
String contentType)
This method is used to do a http post request
|
String |
doPostHttps(String url,
String payload,
String sessionId,
String contentType)
This method is used to do a https post request
|
String |
doPut(String url,
String sessionId)
This method is used to do a http put request
|
static String |
getHtml(String url)
This method is use get a html file for given url
|
public static String getHtml(String url) throws IOException
url - Web page urlIOException - Throws this when failed to retrieve web pagepublic String doPostHttps(String url, String payload, String sessionId, String contentType) throws IOException
url - request urlpayload - Content of the post requestsessionId - sessionId for authenticationcontentType - content type of the post requestIOException - - Throws this when failed to fulfill a https post requestpublic String doPostHttp(String url, String payload, String sessionId, String contentType) throws IOException
url - request urlpayload - Content of the post requestsessionId - sessionId for authenticationcontentType - content type of the post requestIOException - - Throws this when failed to fulfill a http post requestpublic String doPut(String url, String sessionId) throws IOException
url - request urlsessionId - sessionId for authenticationIOException - - Throws this when failed to fulfill a http put requestpublic String doGet(String url, String trackingCode, String appmSamlSsoTokenId, String refer) throws IOException
url - request urltrackingCode - tracking code of the web applicationappmSamlSsoTokenId - appmSamlSsoTokenId id of the web applicationrefer - web page urlIOException - Throws this when failed to fulfill a http get requestCopyright © 2017 WSO2. All rights reserved.