Skip to content
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

Discarding entity body for GET requests #210

Open
rlavoie opened this issue Jul 12, 2017 · 13 comments
Open

Discarding entity body for GET requests #210

rlavoie opened this issue Jul 12, 2017 · 13 comments

Comments

@rlavoie
Copy link

rlavoie commented Jul 12, 2017

When making api Get request with request-promise.

This message outputs to the console: Discarding entity body for GET requests

What is it and how can I get rid of it

@analog-nico
Copy link
Member

analog-nico commented Jul 12, 2017

Mmh, never saw such a message. It may be part of what your server is responding with.

Anyway, could you post your code snippet? Maybe I can spot something.

@yunus-alkan
Copy link

I'm getting this message in angular ssr project. Any solve?

@analog-nico
Copy link
Member

@yunus-alkan I am still looking for a code snippet that can reproduce this message. Could you provide one?

@yunus-alkan
Copy link

yunus-alkan commented Aug 21, 2017

@analog-nico
I've used this codes in my project.
https://coursetro.com/posts/code/68/Make-your-Angular-App-SEO-Friendly-(Angular-4-+-Universal)

It uses express js server. When opening static pages in browser, webpage is trying to get static files such as favicon, some images etc. At that point, we get "Discarding entity body for GET requests". It doesn't cause the crash, but there must be wrong right?

@RSginer
Copy link

RSginer commented Sep 25, 2017

same problem +1

@rafinskipg
Copy link

+1

@RSginer
Copy link

RSginer commented Oct 15, 2017

@analog-nico any updates?

@devtaha
Copy link

devtaha commented Oct 26, 2017

@analog-nico any update on this issue?

@Slals
Copy link

Slals commented Jan 24, 2018

Any idea? I also have this issue, and it blocks the server side rendering process.

@NKjoep
Copy link

NKjoep commented Jul 5, 2018

For the record, the message comes from the xhr2 lib and it's a warning. (You can check the source code or in your node_modules directory xhr2/lib/xhr2.js.)

@yunus-alkan angular depends on it and this warning doesn't prevent the SSR to work. There should be something else in your code preventing it to work.

@rip222
Copy link

rip222 commented Jun 4, 2019

anybody came up with any solution?
my angular ssr app got the same message

@jimni1222
Copy link

When requesting a GET, I passed null in the payload parameter before calling the code `reqeust.send(JSON.stringify(payload))'.

As a result, the message "Discarding entity body for GET requests" was printed.

If you do JSON.stringify(null), you will get'null' as a result.
To avoid this, i changed torequest.send(payload !== null? JSON.stringify(payload): null) and no more that message.

@hy598786682
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests