| Package: | CQ |
| Class: | HTTP |
| Extends: | Object |
| Clientlib: | cq.widgets |
body: Stringheaders: ObjectStatus: NumberMessage: StringLocation: StringPath: String| Property | Defined By | |
|---|---|---|
|
EXTENSION_HTML : String Deprecated: use CQ.shared.HTTP.EXTENSION_HTML instead
<static> The extension for HTML files. |
HTTP | |
|
EXTENSION_JSON : String Deprecated: use CQ.shared.HTTP.EXTENSION_JSON instead
<static> The extension for JSON files. |
HTTP | |
|
HEADER_LOCATION : String Deprecated: use CQ.shared.HTTP.HEADER_LOCATION instead
<static> The Location header. |
HTTP | |
|
HEADER_MESSAGE : String Deprecated: use CQ.shared.HTTP.HEADER_MESSAGE instead
<static> The Message header. |
HTTP | |
|
HEADER_PATH : String Deprecated: use CQ.shared.HTTP.HEADER_PATH instead
<static> The Path header. |
HTTP | |
|
HEADER_STATUS : String Deprecated: use CQ.shared.HTTP.HEADER_STATUS instead
<static> The Status header. |
HTTP | |
|
PARAM_NO_CACHE : String Deprecated: use CQ.shared.HTTP.PARAM_NO_CACHE instead
<static> The parameter name for no caching. |
HTTP | |
| Method | Defined By | |
|---|---|---|
addParameter( String url, String name, String/String[] value ) : String Deprecated: use CQ.shared.HTTP.addParameter instead
<static> Adds a parameter to the specified URL. The parameter name and
value will be URL-endcoded.
<static> Adds a parameter to the specified URL. The parameter name and
value will be URL-endcoded.
Parameters:
|
HTTP | |
addSelector( String url, String selector, [Number index] ) : String Deprecated: use CQ.shared.HTTP.addSelector instead
Adds the specified selector to an URL.
Adds the specified selector to an URL.
Added in CQ 5.3.
Parameters:
|
HTTP | |
clearCookie( String name, [String path], [String domain], [Boolean secure] ) : void Deprecated: use CQ.shared.HTTP.clearCookie instead
<static> Clears the cookie with the specified name.
<static> Clears the cookie with the specified name.
Parameters:
|
HTTP | |
encodePath( String path ) : String Deprecated: use CQ.shared.HTTP.encodePath instead
Encodes the specified path using encodeURI. Additionally +,
# and ? are encoded.
The following characters are not enc...
Encodes the specified path using encodeURI. Additionally
Added in CQ 5.3.
+,
# and ? are encoded.The following characters are not encoded: 0-9 a-z A-Z- _ . ! ~ * ( )/ : @ & =
Parameters:
|
HTTP | |
encodePathOfURI( String url ) : String Deprecated: use CQ.shared.HTTP.encodePathOfURI instead
Encodes the path of the specified URL if it is not already encoded.
Path means the part of the URL before the first q...
Encodes the path of the specified URL if it is not already encoded.
Path means the part of the URL before the first question mark or
hash sign.
Added in CQ 5.3.
See CQ.shared.HTTP.encodePath for details about the encoding. Sample: /x/y+z.png?path=/x/y+z >> /x/y%2Bz.png?path=x/y+zNote that the sample would not work because the "+" in the request parameter would be interpreted as a space. Parameters must be encoded separately.
Parameters:
|
HTTP | |
eval( Object/String response ) : Object Deprecated: use CQ.shared.HTTP.eval instead
<static> Evaluates and returns the body of the specified response object.
Alternatively, a URL can be specified...
<static> Evaluates and returns the body of the specified response object.
Alternatively, a URL can be specified, in which case it will be
requested using a synchornous get in order to acquire
the response object.
Added in CQ 5.3.
Parameters:
|
HTTP | |
externalize( String url, [boolean encode] ) : String Deprecated: use CQ.shared.HTTP.externalize instead
<static> Makes sure the specified relative URL starts with the context path
used on the server. If an absolute ...
<static> Makes sure the specified relative URL starts with the context path
used on the server. If an absolute URL is passed, it will be returned
as-is.
Added in CQ 5.3.
Parameters:
|
HTTP | |
get( String url, [Function callback], [Object scope] ) : Mixed <static> Requests the specified URL from the server using GET. The request
will be synchronous, unless a callba...
<static> Requests the specified URL from the server using GET. The request
will be synchronous, unless a callback function is specified.
Parameters:
|
HTTP | |
getAnchor( String url ) : String Deprecated: use CQ.shared.HTTP.getAnchor instead
<static> Returns the anchor part of the URL.
<static> Returns the anchor part of the URL.
Parameters:
|
HTTP | |
|
getContextPath() : String Deprecated: use CQ.shared.HTTP.getContextPath instead
<static> Returns the context path used on the server.
<static> Returns the context path used on the server.
Added in CQ 5.3.
Parameters:
|
HTTP | |
getCookie( String name ) : String Deprecated: use CQ.shared.HTTP.getCookie instead
<static> Returns the value of the cookie with the specified name.
<static> Returns the value of the cookie with the specified name.
Parameters:
|
HTTP | |
getExtension( String url ) : String Deprecated: use CQ.shared.HTTP.getExtension instead
Returns the extension of an URL. This is the string
after the last dot until the end of the url without
any request p...
Returns the extension of an URL. This is the string
after the last dot until the end of the url without
any request parameters, anchors or suffix, for
example "html".
Added in CQ 5.4.
Parameters:
|
HTTP | |
getParameter( String url, String name ) : String Deprecated: use CQ.shared.HTTP.getParameter instead
<static> Returns the value of the parameter with the specified name
in the URL. Only the first value will be co...
<static> Returns the value of the parameter with the specified name
in the URL. Only the first value will be considered.
Values will be URL-decoded.
Parameters:
|
HTTP | |
getParameters( String url, String name ) : String[] Deprecated: use CQ.shared.HTTP.getParameters instead
<static> Returns the values of the parameters with the specified name
in the URL. Values will be URL-decoded.
<static> Returns the values of the parameters with the specified name
in the URL. Values will be URL-decoded.
Parameters:
|
HTTP | |
getPath( String url ) : String Deprecated: use CQ.shared.HTTP.getPath instead
<static> Removes all parts but the path from the specified URL.
Examples:/x/y.sel.html?param=abc => /x/y
htt...
<static> Removes all parts but the path from the specified URL.
Added in CQ 5.3.
Examples:
Parameters:
|
HTTP | |
getSchemeAndAuthority( String url ) : String Deprecated: use CQ.shared.HTTP.getSchemeAndAuthority instead
<static> Returns the scheme and authority (user, hostname, port) part of
the specified URL or an empty string i...
<static> Returns the scheme and authority (user, hostname, port) part of
the specified URL or an empty string if the URL does not include
that part.
Parameters:
|
HTTP | |
getSelectors( String url ) : Array Deprecated: use CQ.shared.HTTP.getSelectors instead
<static> Returns an array with the selectors present in the given url.
If no selectors are present, an empty ar...
<static> Returns an array with the selectors present in the given url.
If no selectors are present, an empty array is returned.
Added in CQ 5.4.
Parameters:
|
HTTP | |
|
getSuffix() : String Deprecated: use CQ.shared.HTTP.getSuffix instead
<static> Returns the current request suffix as provided by CQURLInfo.suffix.
<static> Returns the current request suffix as provided by CQURLInfo.suffix.
Added in CQ 5.5.
Parameters:
|
HTTP | |
internalize( String url, [String doc] ) : String Deprecated: use CQ.shared.HTTP.internalize instead
<static> Removes scheme, authority and context path from the specified
absolute URL if it has the same scheme a...
<static> Removes scheme, authority and context path from the specified
absolute URL if it has the same scheme and authority as the
specified document (or the current one).
Added in CQ 5.3.
Parameters:
|
HTTP | |
isOk( Object response ) : Boolean Deprecated: use CQ.shared.HTTP.isOk instead
<static> Checks if the specified response is OK.
The response object is expected to look like this:
{ headers: ...
<static> Checks if the specified response is OK.
The response object is expected to look like this:
See constants above for all supported headers.
Parameters:
|
HTTP | |
isOkStatus( Number status ) : Boolean Deprecated: use CQ.shared.HTTP.isOkStatus instead
<static> Checks whether the specified status code is OK.
<static> Checks whether the specified status code is OK.
Parameters:
|
HTTP | |
multiPartPost( String url, [Function callback], Object params, Object scope, Boolean suppressErrorMsg ) : Mixed <static> Requests the specified URL from the server using multipart POST. The request
will be synchronous, unle...
<static> Requests the specified URL from the server using multipart POST. The request
will be synchronous, unless a callback function is specified.
The returned response object looks like this:
See constants above for all supported headers.
Parameters:
|
HTTP | |
noCaching( String url ) : String Deprecated: use CQ.shared.HTTP.noCaching instead
<static> Prevents caching by adding a timestamp to the specified URL.
<static> Prevents caching by adding a timestamp to the specified URL.
Parameters:
|
HTTP | |
post( String url, [Function callback], Object params, Object scope, Boolean suppressErrorMsg ) : Mixed <static> Requests the specified URL from the server using POST. The request
will be synchronous, unless a callb...
<static> Requests the specified URL from the server using POST. The request
will be synchronous, unless a callback function is specified.
The returned response object looks like this:
See constants above for all supported headers.
Parameters:
|
HTTP | |
removeAnchor( String url ) : String Deprecated: use CQ.shared.HTTP.removeAnchor instead
<static> Removes the anchor from the specified URL.
<static> Removes the anchor from the specified URL.
Parameters:
|
HTTP | |
removeParameter( String url, String name ) : String Deprecated: use CQ.shared.HTTP.removeParameter instead
<static> Removes a parameter from the specified URL.
<static> Removes a parameter from the specified URL.
Parameters:
|
HTTP | |
removeParameters( String url ) : String Deprecated: use CQ.shared.HTTP.removeParameters instead
<static> Removes all parameter from the specified URL.
<static> Removes all parameter from the specified URL.
Parameters:
|
HTTP | |
setAnchor( String url, String anchor ) : String Deprecated: use CQ.shared.HTTP.setAnchor instead
<static> Sets the anchor of the specified URL.
<static> Sets the anchor of the specified URL.
Parameters:
|
HTTP | |
setCookie( String name, String value, [String path], [Number days], [String domain], [Boolean secure] ) : String Deprecated: use CQ.shared.HTTP.setCookie instead
<static> Sets the value of the cookie with the specified name.
<static> Sets the value of the cookie with the specified name.
Parameters:
|
HTTP | |
setParameter( String url, String name, String value ) : String Deprecated: use CQ.shared.HTTP.setParameter instead
<static> Overwrites a parameter in the specified URL. The parameter name
and value will be URL-endcoded.
<static> Overwrites a parameter in the specified URL. The parameter name
and value will be URL-endcoded.
Parameters:
|
HTTP | |
setSelector( String url, String selector, Number index ) : String Deprecated: use CQ.shared.HTTP.setSelector instead
Replaces the selector at the given index position. If no selector exists
at the index position, no change is made to ...
Replaces the selector at the given index position. If no selector exists
at the index position, no change is made to the URL.
Added in CQ 5.4.
Parameters:
|
HTTP | |