public class HTTPUtils extends Object
Constructor and Description |
---|
HTTPUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
addURLParameter(String url,
String paramname,
String paramvalue) |
static String |
extractAuthServletPathFromRequest(javax.servlet.http.HttpServletRequest req)
Extract the IDP requested URL from authrequest
|
static String |
extractAuthURLFromRequest(javax.servlet.http.HttpServletRequest req)
Extract the IDP PublicURLPrefix from authrequest
|
static String |
getBaseURL(javax.servlet.http.HttpServletRequest request)
Helper method to retrieve server URL including context path
|
static String |
getServerURL(javax.servlet.http.HttpServletRequest request)
Helper method to retrieve server URL
|
static String |
readHttpURL(String URL)
Utility used to obtainin correct encoded HTTP content.
|
public static String readHttpURL(String URL) throws IOException
URL
- HTTP URL to read from.IOException
- on data-reading problemspublic static String getBaseURL(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequestpublic static String getServerURL(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequestpublic static String extractAuthURLFromRequest(javax.servlet.http.HttpServletRequest req)
req
- HttpServletRequestpublic static String extractAuthServletPathFromRequest(javax.servlet.http.HttpServletRequest req)
req
- HttpServletRequestCopyright © 2017. All rights reserved.