This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Feat: Add support for plain text response as alternative to JSON #7
Labels
Comments
Hej, this is something which:
I wish I had more time, but I already spent my open source time slot for today otherwise I would start coding just now. Long story short: Cheers, Michael P.S. |
Closed
mischah
changed the title
How can add a simple text as response?
Feat: Add support for plain text response as alternative to JSON
Sep 12, 2017
This was referenced Dec 1, 2017
mischah
added a commit
that referenced
this issue
Dec 3, 2017
The new option `mimeType` lets you respond with any file type you want. Closes #7
Hej @stelioschar, it took a while … but the feature landed in v4.0.0 yesterday. |
🎉 🎉 🎉 🎉 🎉 🎉 |
mischah
added a commit
to micromata/generator-http-fake-backend
that referenced
this issue
Feb 18, 2018
> # http-fake-backend 4.0.2 > > ## Bug Fixes > > * update minimum node version in package.json > >*Change `engines.node` to `>=6.0.0` to reflect the minimum node version which is needed since http-fake-backend 4.0.0.* > > # http-fake-backend 4.0.1 > > ## Bug Fixes > > * encoding of binary files send via endpoints > > # http-fake-backend 4.0.0 > > ## Bug Fixes > > * **dependencies:** Apply changes of boom update > * **dependencies:** Update dependencies > > ## Code Refactoring > > * Refactor existing codebase > > ## Documentation > > * Update required minimum Node version in readme > > ## Features > > * Add support for other response content-types, closes [#7](micromata/http-fake-backend#7) > * Add support for sending files as response, closes [#11](micromata/http-fake-backend#11) > > ## BREAKING CHANGES > > * The transitive dependency punycode@2.1.0 needs Node version ">=6". > * The setup.js is divided to multiple files. Therefore you need to change the import of the setup in your endpoint files like the following: > > ```javascript > // before > const SetupEndpoint = require('./setup/setup.js'); > > // now > const SetupEndpoint = require('./setup/index.js'); > > // or: > const SetupEndpoint = require('./setup/'); > ```
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey @mischah,
Very promising work! I landed here once the json-server has some limitations.
What I would like to know is how can I return a simple text in some cases.
E.g When I make a PUT request to
/api/simpleExample/update/1
to get the textDONE
Thank you
The text was updated successfully, but these errors were encountered: