# Interface IEndpointCallerOptions

Possible options when creating a EndpointCaller

## Index

### Properties

- accessToken
- anonymous
- password
- requestModifier
- username
- xmlHttpRequest

## Properties

### Optional accessToken

accessToken: string

- Defined in rest/EndpointCaller.ts :149

The access token to use for this endpoint.

### Optional anonymous

anonymous: boolean

- Defined in rest/EndpointCaller.ts :178

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

- Defined in rest/EndpointCaller.ts :159

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

### Optional requestModifier

requestModifier: function

- Defined in rest/EndpointCaller.ts :165

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

- - (params: IRequestInfo<any>): IRequestInfo<any>

  - #### Parameters

    - ##### params: IRequestInfo<any>

    #### Returns IRequestInfo<any>

### Optional username

username: string

- Defined in rest/EndpointCaller.ts :154

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

### Optional xmlHttpRequest

xmlHttpRequest: object

- Defined in rest/EndpointCaller.ts :171

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

#### Type declaration

### Hierarchy

- IEndpointCallerOptions