Class: HttpSearchConfig

searchService.HttpSearchConfig()

new HttpSearchConfig()

Configures and builds the module:searchService.HttpClient. DescribedDataField is the main element of the restructured data and therefore considered "public".

Source:

Methods

build() → {HttpSearchClient}

Uses the configuration to build the http client that provides the function "search" (parameters: searchParameters, onSuccess callback).

Source:
Returns:
Type
HttpSearchClient

debugMode(value) → {module:searchService.HttpSearchConfig}

Sets the debug mode, that prints some more info to the console.

Parameters:
Name Type Description
value boolean
Source:
Returns:
Type
module:searchService.HttpSearchConfig

httpRequest(value) → {module:searchService.HttpSearchConfig}

Sets the HTTP-Request-Object. Defaults to XMLHttpRequest if not set.

Parameters:
Name Type Description
value String
Source:
Returns:
Type
module:searchService.HttpSearchConfig

searchBodyTemplate(value) → {module:searchService.HttpSearchConfig}

Sets the HTTP request body template that may contain variables (e.g. {{searchParameters}}) in double curly brackets, or null if there is none.

Parameters:
Name Type Description
value String
Source:
Returns:
Type
module:searchService.HttpSearchConfig

searchContentType(value) → {module:searchService.HttpSearchConfig}

Sets the HTTP content type of the request body. Defaults to "application/json".

Parameters:
Name Type Description
value String
Source:
Returns:
Type
module:searchService.HttpSearchConfig

searchMethod(value) → {module:searchService.HttpSearchConfig}

Sets the HTTP method for the search. Defaults to "POST".

Parameters:
Name Type Description
value String
Source:
Returns:
Type
module:searchService.HttpSearchConfig

searchUrlTemplate(value) → {module:searchService.HttpSearchConfig}

Sets the url for the HTTP request for the search. It may include variables in double curly brackets like {{searchtext}}.

Parameters:
Name Type Description
value String
Source:
Returns:
Type
module:searchService.HttpSearchConfig