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

RequestInterface vs. ServerRequestInterface #15

Closed
ppetermann opened this issue Oct 7, 2015 · 2 comments
Closed

RequestInterface vs. ServerRequestInterface #15

ppetermann opened this issue Oct 7, 2015 · 2 comments

Comments

@ppetermann
Copy link

I just noticed that Relay seems to be using \Psr\Http\Message\RequestInterface, and was wondering why, as in my opinion for Middleware the \Psr\Http\Message\ServerRequestInterface would be a better fit?

@elazar
Copy link

elazar commented Oct 7, 2015

I suspect because that would limit the potential applications. Even though it would likely be the less common use case, it's possible to use Relay to apply and dispatch a request from an HTTP client, versus using it to dispatch incoming application requests.

@pmjones
Copy link
Contributor

pmjones commented Oct 14, 2015

@elazar has it right. The earliest version was ServerRequest interface, but then @oscarotero in #5 remarked that having "client-side use" would be valuable, with little or no negative effect to "server-side use". I agreed, and so we have both client- and server-side capability now.

@pmjones pmjones closed this as completed Oct 14, 2015
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

3 participants