web.Request methods

Note: For method usage example, click the method name. You will be referred to the examples page.

Method Name

Argument

Returned Value

Description

getURL

 

web.URL

Retrieves request URL.

setURL

web.URL

 

Defines request URL.

getBody

 

String

Retrieves request body.

setBody

String

This object

Defines request body.

getHost

 

String

Retrieves request host.

setHost

String

This object

Defines request host.

getPort

 

String

Retrieves request port.

setPort

String

This object

Defines request port.

getCookie

 

String

Retrieves a cookie for the location specified by a URL. Cookies parameters are specified by position.

setCookie

String

This object

Defines a cookie to be sent along with the rest of the HTTP headers. Cookies must be sent before any output from your script (this is a protocol restriction).

getContentType

 

String

Retrieves request content type.

setContentType

String

This object

Defines request content type.

getMethod

 

String

Returns the type of method used by request (POST/GET).

setMethod

String

This object

Defines the type of method to be used for the request.

getSession

 

Session

Returns the current session associated with this request, or if the request does not have a session, creates one.

setSession

Session

This object

Defines sessions that should be used by request. If a session already exists, it is overwritten.

getSchema

 

String

Returns the schema used by request.

setSchema

String

This object

Defines the schema to be used for the request.

getPath

 

String

Returns the path to the resource used by request.

setPath

String

This object

Defines the path to be used for the request.

getQuery

 

String

Returns the query used by request.

setQuery

String

This object

Defines the query to be used for the request.

getFragmentId

 

String

Returns the fragment used by request.

setFragmentId

String

This object

Defines the fragment to be used for the request.

param

Key (String),

Value (String)

This object

Adds the parameter to the request. Used for setting a response timeout.

authParam

Name (String),

Value (String)

This object

Adds the authentication parameter to the request.

header

Key (String),

Value (String)

This object

Adds the header to the request.

perform

web.Session (optional)

web.Response

Performs request to the server`s side.

performAsync

web.Session (optional)

Future

Performs the request asynchronously to the server`s side. Returns the Future object.

performStream

web.Session (optional)

Stream

Performs the request asynchronously to the server`s side. Returns the Stream object.

web.Request.create

 

web.Request

Is a static method that creates a request object.

web.Request.put

web.Url

web.Request

Is a static method that creates a request object with a defined PUT method.

web.Request.get

web.Url

web.Request

Is a static method that creates a request object with a defined GET method.

web.Request.post

web.Url

web.Request

Is a static method that creates a request object with a defined POST method.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.