Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Snowcrash should warn when blueprint specifies Request with GET method #64

Closed
Almad opened this issue Dec 13, 2013 · 6 comments
Closed

Comments

@Almad
Copy link
Contributor

Almad commented Dec 13, 2013

With GET, there should be no request body.

When it's specified in blueprint, snowcrash should warn or err.

@zdne
Copy link
Contributor

zdne commented Dec 13, 2013

@Almad

Specifying a request HTTP message body for a GET request does not violate HTTP1.1. See here and also here.

Also Fielding's comment seems to be spot on. Personally I know of at least one API (GitHub) that does process HTTP request message body even with the GET method (auth token sent in request message body).

Since this is not a violation of the HTTP spec and it is occasionally used I would vote for not introducing this behavior.

@Almad
Copy link
Contributor Author

Almad commented Dec 13, 2013

@zdne Hmm.

So, yes, you can send a body with GET, and no, it is never useful to do so.

That's why I'd vote for warning. I believe most people add this by mistake and not intentionally...and those who do can get non-harmful warnings.

But we may leave this open.

@zdne
Copy link
Contributor

zdne commented Dec 13, 2013

non-harmful warnings

Regarding warnings I have learned that there are generally two groups of people: Those who don't care about them at all and those who take even the smallest warning very seriously. The later group seems to be a lot bigger (read: louder).

@zdne zdne removed the question label Jul 24, 2014
@pksunkara
Copy link
Contributor

I am against adding a warning as long as it's not violating HTTP spec. @zdne Please decide if we are going to tag this as improvement or close this issue.

@zdne
Copy link
Contributor

zdne commented Sep 26, 2014

I guess that some sort of "HTTP module" with its own HTTP-warnings (see #51) should be introduced and possible capture this situation.

I would certainly not add this as a current parser's warning.

@abtris
Copy link
Contributor

abtris commented Oct 1, 2018

Migrated to apiaryio/drafter#646

@abtris abtris closed this as completed Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants