Open nshakura opened 7 years ago
Hi @Peter-Pupkin,
Thank you, I will check that.
I can't seem to be able to reproduce. Do you still have the error?
I tried to go to https://jsonplaceholder.typicode.com/posts and make the following request from the console:
$.ajax('https://jsonplaceholder.typicode.com/posts', {
method: 'POST',
data: {
title: 'foo',
body: 'bar',
userId: 1
}
}).then(function(data) {
console.log(data);
});
I've reproduced it with postman.
POST
http://localhost:3000/posts/
raw
you send the object { title: 'foo', body: 'bar', userId: 1 }
GET
http://localhost:3000/posts/
and you obtain the wrong response.How to solve it? Make a right request.
HEADERS
to Content-Type: application/x-www-form-urlencoded
x-www-form-urlencoded
fill the right key-value
pairs.
Request to
https://jsonplaceholder.typicode.com/posts
gives me responsepay attention to incorrect last item