Comments (4)
Hi Kokujin,
Do you have a README for RestClient? I don't know this tool.
Regarding the 500 error, I can give some explanations but not sure if that's what you're asking for.
Anyway, this is because JSONPlaceholder is mostly read-only. It just fakes resources creation and updates.
Here's how it works:
There are 100 posts in JSONPlaceholder.
You can POST to http://jsonplaceholder.typicode.com/posts, it will tell you it was created but in fact if you make a GET request to the same URL you'll still have 100 posts.
So when you try to update post 102, it doesn't exist (though I agree there could be a better status code than 500, I'll fix that when I have the time).
If the problem is that there's no post created, I'd suggest that you run JSON Server instead, it's read and write.
from json-server.
Thanks @typicode . I'll probably run my own server although I think the site and fake services great, its so bothersome when one wants to test a client quickly :)
https://github.com/jpillora/jquery.rest
from json-server.
Cool, I appreciate your feedback.
And I'll try to improve the returned status code :)
Thanks for the link.
from json-server.
JSON-Server v0.4.0 now returns 404 when trying access a resource that doesn't exist. Closing the issue here (jsonplaceholder will need to be updated though).
from json-server.
Related Issues (20)
- Running "json-server --watch ./data/db.json --port 8000 --routes ./data/routes.json" results in the error "Unknown option '--routes'" HOT 5
- Issues with installing to non alpha version HOT 3
- How do I set up a unique road handler? HOT 1
- Error on : json-server --watch db.json HOT 1
- query parameter does not working HOT 3
- Weird behaviour when property "period" is in json mock data
- Steps to serve multiple json files with json-server HOT 3
- `_gte` and `_lte` doesn't work for dates HOT 3
- In new version not working `_sort=price&_order=asc` , please fix this issue.
- Multiple filters not working
- Whats cuestión? For the api?
- cors problem HOT 2
- Has the --delay option been removed? HOT 4
- not working at all
- conditional operators doesn't work
- I have a problem opening Json-server --watch.db.json HOT 1
- ?_page= or &_page= no longer working.
- _sort=price&_order=asc no longer working HOT 1
- it doesn't work on xxx.js or remote url,though xxx.json is ok
- SyntaxError: Unexpected token '||=' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-server.