Opened as pull request for easier review, serves non-json api responses through content-negotiation (node-mock-server considers Accept: header). That allows to serve an api success file as json, xml, html, image.
E.g. a rest backend could serve an html fragment with dynamic content for inclusion by an SPA, or it could serve a dynamic QRCode image as API response.
Opened as pull request for easier review, serves non-json api responses through content-negotiation (node-mock-server considers Accept: header). That allows to serve an api success file as json, xml, html, image. E.g. a rest backend could serve an html fragment with dynamic content for inclusion by an SPA, or it could serve a dynamic QRCode image as API response.
Closes smollweide/node-mock-server/issues/44