Closed marcelovidigal closed 4 years ago
Problem solved with the inclusion of the template interceptor in client.js. Remember to replace all done
with then
in app.js.
const template = require('rest/interceptor/template'); ... .wrap(template) .wrap(defaultRequest, { headers: { 'Accept': 'application/hal+json' }});
'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 template = require('rest/interceptor/template');
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(uriTemplateInterceptor)
.wrap(errorCode)
.wrap(template)
.wrap(defaultRequest, { headers: { 'Accept': 'application/hal+json' }});
I have the same problem and your solution didnt work for me :(
For what it is worth, this worked for me after completing part 5 but losing front-end paging options.
I am running same code from GIT but paging not working, no pagination is shown, JS code does not present errors, but at each execution all items are displayed. Does anyone have any suggestions for this, I believe it is something with the rest client.