new Config()
The default configuration options
Properties:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
baseUrl | 
            
            String | The base URL for requests. I.e, if the   | 
        |||||||
defaultParams | 
            
            Object | The default parameters for requests. Can be overriden by specific requests  | 
        |||||||
fields | 
            
            Object | The special fields used to determine url (and later, header) information Properties
  | 
        |||||||
headers | 
            
            Array.<Array.<String>> | The default headers for requests, defaults to an empty array, expected elements:   | 
        |||||||
responseType | 
            
            String | The response type for the request. See the docs for   | 
        |||||||
timeout | 
            
            number | 
                
                    <optional> | 
            
            
            The XHR timeout. See the docs for   | 
        ||||||
withCredentials | 
            
            boolean | 
                
                    <optional> | 
            
            
            Whether to send CORS credentials with the request or not. See the docs for   | 
        
Methods
(static) Rest.Config.set(config)
Sets a given config to the configuration object
Parameters:
| Name | Type | Description | 
|---|---|---|
config | 
            
            Object | The specified config  | 
        
Example
Rest.Config.set({baseUrl: 'https://restjs.js.org'})