To use the network layer, you should check/update the following options:
baseUrl- The base path to the API. Default is
"/", but could be something like
endpoint- Path to the model type on the API. If not defined, it will use the model type. This can be used if the url needs to be prefixed (e.g. model scoping) or e.g. if the url is in plural, but the model type is in singular. Using the endpoint function allows you to override the
baseUrlin case some models need a different base URL.
fetchReference- Set to
window.fetchby default, but can be set to some other
defaultFetchOptions- If needed, you can define default options that are passed to the fetch method. Keep in mind that the body and method properties will be overridden. By default, it is setting the
content-typeheader according to the JSON API specification
If you want to use some other method of communication with the server (e.g. jQuery, superagent or axios), you can override the
For a detailed specification of the available options, check out the config options.