Package com.okta.commons.http
Class RequestUtils
java.lang.Object
com.okta.commons.http.RequestUtils
- Since:
- 0.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringfetchHeaderValueAndRemoveIfPresent(Request request, String headerName) static StringgetFormattedDate(Date inDate) Convert supplied Date object into ISO 8601 formatted date string (e.g. 2017-11-30T21:15:16Z) that Okta core supports.static booleanisDefaultPort(URI uri) Returnstrueif the specified URI uses a standard port (i.e. http == 80 or https == 443),falseotherwise.
-
Method Details
-
isDefaultPort
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
-
getFormattedDate
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
-
fetchHeaderValueAndRemoveIfPresent
-