-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST apis are returning just an object with id prop only #113
Comments
Hi,
Thank you for using FakeStoreAPI!
Yes, you are correct. It just returns a sample ID after adding a product,
but it will be changed in the next version to return full props.
Happy coding!
Let me know if you have any questions.
…On Fri, Oct 6, 2023 at 7:23 PM avinashcodelabs ***@***.***> wrote:
Hi,
I am trying out add product api - POST verb,
fetch("https://fakestoreapi.com/products", {
method: "POST",
body: JSON.stringify({
title: "test product",
price: 13.5,
description: "lorem ipsum set",
image: "https://i.pravatar.cc",
category: "electronic",
}),
})
.then((res) => res.json())
.then((json) => console.log(json));
The above code returns just an object with id prop, expected behaviour is,
it should return an object with id prop along with other props as well.
{id: 21}
Let me know if you need help in reproducing the issue or PR with a fix,
just wanted to comfirm with you before digging deep on the issue.
—
Reply to this email directly, view it on GitHub
<#113>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMZHCAJZDNBEUG4CJ5I4RIDX6ASONAVCNFSM6AAAAAA5WAV7QWVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTANBZGE4TGMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi @keikaavousi, |
I have fixed it, it will be ok within 1-2 days
…On Mon, Oct 9, 2023 at 11:31 AM avinashcodelabs ***@***.***> wrote:
Hi @keikaavousi <https://github.com/keikaavousi>,
Thanks for the quick reply.
Has anyone working in it "return full props"?
I would like to contribute to it, let me know if you need any help, I am
proficient in JavaScript, Node.js and Express.
—
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMZHCAPWASXWUCHYSY6VMFTX6OVOZAVCNFSM6AAAAAA5WAV7QWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGUYTMNBWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying out add product api - POST verb,
The above code returns just an object with id prop, expected behaviour is, it should return an object with id prop along with other props as well.
{id: 21}
Let me know if you need help in reproducing the issue or PR with a fix, just wanted to comfirm with you before digging deep on the issue.
The text was updated successfully, but these errors were encountered: