Skip to content
Switch branches/tags
Go to file
Catch up to latest versions of core infrastructure. Also polish up certain bits of ES5 code to better use ES6+ options.
1 contributor

Users who have contributed to this file

'use strict';
const rest = require('rest');
const defaultRequest = require('rest/interceptor/defaultRequest');
const mime = require('rest/interceptor/mime');
const uriTemplateInterceptor = require('./api/uriTemplateInterceptor');
const errorCode = require('rest/interceptor/errorCode');
const baseRegistry = require('rest/mime/registry');
const registry = baseRegistry.child();
registry.register('text/uri-list', require('./api/uriListConverter'));
registry.register('application/hal+json', require('rest/mime/type/application/hal'));
module.exports = rest
.wrap(mime, { registry: registry })
.wrap(defaultRequest, { headers: { 'Accept': 'application/hal+json' }});