Interface IEndpointCallerOptions

Possible options when creating a EndpointCaller

Index

Properties

Optional accessToken

accessToken: string

The access token to use for this endpoint.

Optional anonymous

anonymous: boolean

Specifies that the request (and the Coveo Search API) does not need any kind of authentication.
This flag is only needed for specific setups when your requests are being blocked by your browser. If your queries are executing correctly, you do not need to bother.
Setting this flag will prevent the withCredentials option to be set on the XMLHttpRequest, allowing performing cross-domain requests on a server that returns * in the Access-Control-Allow-Origin HTTP header.

Optional password

password: string

The password to use to log into this endpoint. Used for basic auth.
Not used if accessToken is provided.

Optional requestModifier

requestModifier: function

A function which will allow external code to modify all endpoint call parameters before they are sent by the browser.

Used in very specific scenario where the network infrastructure require special request headers to be added or removed, for example.

Type declaration

Optional username

username: string

The username to use to log into this endpoint. Used for basic auth.
Not used if accessToken is provided.

Optional xmlHttpRequest

xmlHttpRequest: object

The XmlHttpRequest implementation to use instead of the native one. If not specified, the native one is used.

Type declaration

Hierarchy

  • IEndpointCallerOptions