Package com.okta.commons.http
Class RequestUtils
- java.lang.Object
-
- com.okta.commons.http.RequestUtils
-
public final class RequestUtils extends java.lang.Object- Since:
- 0.5.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringencodeUrl(java.lang.String value, boolean path, boolean canonical)static java.lang.StringgetFormattedDate(java.util.Date inDate)Convert supplied Date object into ISO 8601 formatted date string (e.g.static booleanisDefaultPort(java.net.URI uri)Returnstrueif the specified URI uses a standard port (i.e.
-
-
-
Method Detail
-
isDefaultPort
public static boolean isDefaultPort(java.net.URI uri)
Returnstrueif the specified URI uses a standard port (i.e. http == 80 or https == 443),falseotherwise.- Parameters:
uri- true if the specified URI uses a standard port- Returns:
- true if the specified URI is using a non-standard port, false otherwise
-
encodeUrl
public static java.lang.String encodeUrl(java.lang.String value, boolean path, boolean canonical)
-
getFormattedDate
public static java.lang.String getFormattedDate(java.util.Date inDate)
Convert supplied Date object into ISO 8601 formatted date string (e.g. 2017-11-30T21:15:16Z) that Okta core supports.- Parameters:
inDate-- Returns:
- ISO formatted string
-
-