<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [BaseService](./ibm-cloud-sdk-core.baseservice.md)

## BaseService class

Common functionality shared by generated service classes.

The base service authenticates requests via its authenticator, and sends them to the service endpoint.

**Signature:**

```typescript
export declare class BaseService 
```

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(userOptions)](./ibm-cloud-sdk-core.baseservice._constructor_.md)


</td><td>


</td><td>

Configuration values for a service.


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[baseOptions](./ibm-cloud-sdk-core.baseservice.baseoptions.md)


</td><td>

`protected`


</td><td>

BaseServiceOptions


</td><td>


</td></tr>
<tr><td>

[DEFAULT\_SERVICE\_NAME](./ibm-cloud-sdk-core.baseservice.default_service_name.md)


</td><td>

`static`


</td><td>

string


</td><td>


</td></tr>
<tr><td>

[DEFAULT\_SERVICE\_URL](./ibm-cloud-sdk-core.baseservice.default_service_url.md)


</td><td>

`static`


</td><td>

string


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[configureService(serviceName)](./ibm-cloud-sdk-core.baseservice.configureservice.md)


</td><td>

`protected`


</td><td>

Configure the service using external configuration


</td></tr>
<tr><td>

[convertModel(input, converterFn, isMap)](./ibm-cloud-sdk-core.baseservice.convertmodel.md)


</td><td>

`static`


</td><td>

Applies a given modifier function on a model object. Since the model object can be a map, or an array, or a model, these types needs different handling. Considering whether the input object is a map happens with an explicit parameter.


</td></tr>
<tr><td>

[createRequest(parameters)](./ibm-cloud-sdk-core.baseservice.createrequest.md)


</td><td>

`protected`


</td><td>

Wrapper around `sendRequest` that enforces the request will be authenticated.


</td></tr>
<tr><td>

[createRequestAndDeserializeResponse(parameters, deserializerFn, isMap)](./ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md)


</td><td>

`protected`


</td><td>

Wrapper around `createRequest` that enforces arrived response to be deserialized.


</td></tr>
<tr><td>

[disableRetries()](./ibm-cloud-sdk-core.baseservice.disableretries.md)


</td><td>


</td><td>

Disables retries.


</td></tr>
<tr><td>

[enableRetries(retryOptions)](./ibm-cloud-sdk-core.baseservice.enableretries.md)


</td><td>


</td><td>

Enable retries for unfulfilled requests.


</td></tr>
<tr><td>

[getAuthenticator()](./ibm-cloud-sdk-core.baseservice.getauthenticator.md)


</td><td>


</td><td>

Get the instance of the authenticator set on the service.


</td></tr>
<tr><td>

[getHttpClient()](./ibm-cloud-sdk-core.baseservice.gethttpclient.md)


</td><td>


</td><td>

Get the Axios instance set on the service. All requests will be made using this instance.


</td></tr>
<tr><td>

[setDefaultHeaders(headers)](./ibm-cloud-sdk-core.baseservice.setdefaultheaders.md)


</td><td>


</td><td>

Set the HTTP headers to be sent in every request.


</td></tr>
<tr><td>

[setEnableGzipCompression(setting)](./ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md)


</td><td>


</td><td>

Turn request body compression on or off.


</td></tr>
<tr><td>

[setServiceUrl(url)](./ibm-cloud-sdk-core.baseservice.setserviceurl.md)


</td><td>


</td><td>

Set the service URL to send requests to.


</td></tr>
</tbody></table>
