See https://github.com/php-fig/fig-standards/pull/24
From the introduction:
Many libraries and applications require an HTTP client to talk to
other servers. In general all these libraries either ship their own HTTP
client library, or use low-level PHP functionality such as file_get_contents
,
ext/curl or the ext/socket. Depending on the use-cases there are very
tricky implementation details to be handled such as proxies, SSL,
authentication protocols and many more. Not every small library can
afford to implement all the different details. However there are only a
few http client libraries that are widely used between different
projects, because of NIH or fears of vendor lock-in.
Motivation:
Doctrine has about 4 projects that need an HTTP client. Currently
every projects implements them itself, which is annoying. We could
abstract this into our "Common" library, however that would mean we
would start being a "http client" vendor. Now personally, i don't care
about http clients and would rather let others do this, however i also
don't want to face vendor lock-in by deciding for any of the many http
clients. In a perfect world (with this standard) Doctrine could ship one very simple http client using sockets, and if anyone needs something more awesome, he could just use any other provider of a PSR http client.
--
You received this message because you are subscribed to the Google Groups "PHP Standards Working Group" group.
To post to this group, send email to php-st...@googlegroups.com.
To unsubscribe from this group, send email to php-standard...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/php-standards?hl=en.
--
I realize this is a long shot, but in my dream world the Symfony
HttpFoundation classes for request/response would be made standard.
Their use in the framework & then adoption by Drupal, PPI (?) and
perhaps others make them a great candidate.
For those that don't know it:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Response.php
The use of public properties for some things make them hard to be turned
into interfaces, but anyone can rely on that component and just use
those classes. I guess Composer adoption isn't broad enough for people
to agree with me that this is ok though.
Cheers
--
Jordi Boggiano
@seldaek - http://nelm.io/jordi
> See https://github.com/php-fig/fig-standards/pull/24
>
> From the introduction:
>
> Many libraries and applications require an HTTP client to talk to other servers. In general all these libraries either ship their own HTTP client library, or use low-level PHP functionality such as file_get_contents, ext/curl or the ext/socket. Depending on the use-cases there are very tricky implementation details to be handled such as proxies, SSL, authentication protocols and many more. Not every small library can afford to implement all the different details. However there are only a few http client libraries that are widely used between different projects, because of NIH or fears of vendor lock-in.
>
> Motivation:
>
> Doctrine has about 4 projects that need an HTTP client. Currently every projects implements them itself, which is annoying. We could abstract this into our "Common" library, however that would mean we would start being a "http client" vendor. Now personally, i don't care about http clients and would rather let others do this, however i also don't want to face vendor lock-in by deciding for any of the many http clients. In a perfect world (with this standard) Doctrine could ship one very simple http client using sockets, and if anyone needs something more awesome, he could just use any other provider of a PSR http client.
>
> Questions:
>
> 1. Do the voting members think this is something to standardize?
I personally feel that this group should focus on interface, not implementation.
There is definitely something amiss in the PHP world, where a lot of project have trouble depending on external components.
But introducing a new one, doesn't really solve that I feel. What we need is more people on board with composer.phar,
and have solid, minimal components that projects like doctrine feel comfortable with to add as a dependency.
I _do_ think there is a lot of value in a common request and response interface though. Not just for HTTP client, but
also to wrap $_SERVER, php://output, header(), etc..
If these 2 interfaces exist, it would also not be terribly hard to define a very simple interface for making requests.
After all, at that point all that's really required is a method that takes a Request object, and returns a Response object.
At that point all doctrine would have to do is to provide a way for users to inject the 'Client' interface.
I feel the end-result of your proposal is a nobel and useful one, but I have serious doubts this should be done through PSR.
Evert
> I personally feel that this group should focus on interface, not implementation.
> There is definitely something amiss in the PHP world, where a lot of project have trouble depending on external components.
agreed .. we might elect one implementation as a reference implementation, but more important is that we propose interfaces, a guideline for how to interpret these interfaces and a test suite to check for compliance.
regards,
Lukas Kahwe Smith
m...@pooteeweet.org
> Just realized i forgot cookies.
If you're taking this approach, you will find that you probably forgot a lot of HTTP features :)
If you want to keep things simple, I'd strongly suggest focusing on the following:
1. Request message
- http method
- url
- http version
- headers
- stream for body
2. Response message:
- http status code
- human-readable status
- http version
- headers
- stream for body
Keep in mind that multiple headers can be set with the same name, so a key-value list for
headers may not cover all the use cases.
Using these basic components, you can represent (as far as i know?) any http message.
Anything can be implemented with these components. Cookies would not be an issue, for instance.
Utility objects and classes could be used to aid constructing these headers and deliver them.
These guidelines as a basis, this would allow me:
1. To also wrap the request and response object in my current PHP process.
2. Create a custom client that's capable of asynchronous requests through libevent
3. Create a client that gives me multiple Response objects for every hop in a case of redirects, or a situation where HTTP/1.1 100 Continue is returned.
Your simple client may well be good enough for your use-cases, but in order for something like
this to be successful, it'd be important to create something that doesn't require people to
use other tools as soon as they need anything more complex.
Evert
> Your simple client may well be good enough for your use-cases, but in order for something like
> this to be successful, it'd be important to create something that doesn't require people to
> use other tools as soon as they need anything more complex.
why?
how is not covering the more complex cases going to be a reason to not adopt this for the simple cases?
As a user needing a simple HTTP client, I agree.. no reason to use something more complex if you don't need to.
If you are a provider of an HTTP client (such as Symfony), I'm sure you would agree that you wouldn't want to provide an incomplete client.
Evert
incomplete client? implementing in interface does not preclude you from adding other methods. so i dont see you issue at all.
and there can be other higher level standards that build on this simple interface.
I'm referring to the proposal on github. My point was that it's too simple, and best to first focus on just the Request and Response messages before attempting to define the client.
The current proposal does not have a Request interface, but just a simple set of arguments for making requests.
Was there a miscommunication?
Evert
Apparently so, since i understood you are saying that people wouldnt implement this interface, because its too simple.
Now as for Request/Response, I agree it would be great to also standardize these, but its going to be much harder and the discussion can run in parallel.
As for Benjamin's comment about pecl http: I totally agree that its a good idea to bring Michael into this discussion (actually one of the first things I did after the PR was opened was to ping him on IRC). That being said, we are discussing interfaces here and only implementations in so far as to ensure that the interfaces make sense once they are implemented. Furthermore if possible it is of course also nice to ensure compatibility with existing libs, but as there are already so many, the risk is high that it will just alienate the authors of the given libs if we pick a "favorite".
hm, maybe it makes more sense to focus on pecl_http getting a sane OOP api before it goes into PHP core and until then live with the HTTP client dilemma we have in userland?
hm, maybe it makes more sense to focus on pecl_http getting a sane OOP api before it goes into PHP core and until then live with the HTTP client dilemma we have in userland?
On Sat, Mar 24, 2012 at 7:01 PM, Lukas Kahwe Smith <m...@pooteeweet.org> wrote:
why?
On Mar 24, 2012, at 13:59 , Evert Pot wrote:
> Your simple client may well be good enough for your use-cases, but in order for something like
> this to be successful, it'd be important to create something that doesn't require people to
> use other tools as soon as they need anything more complex.
how is not covering the more complex cases going to be a reason to not adopt this for the simple cases?
--
You received this message because you are subscribed to the Google Groups "PHP Standards Working Group" group.
To post to this group, send email to php-st...@googlegroups.com.
To unsubscribe from this group, send email to php-standards+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/php-standards/-/uTPxNJwxz0QJ.
To unsubscribe from this group, send email to php-standard...@googlegroups.com.
To suggest a course of action that appears to have been fruitful with PSR-1: Compile a list of known HTTP request/response/client libraries, examine them for commonalities, publish the results, and go from there.
Guzzle, Buzz, ZF, Solar (and soon Aura), Symfony, Lithium, Cake, PECL HTTP, etc. all have HTTP request/response classes. They'd be the likely targets for research.
That way at least we have an idea of what people are *actually* doing, and not be limited to our own ideas of what we *think* people *ought* to be doing.
--
Paul M. Jones
http://paul-m-jones.com/
If we feel it helps, I can ask someone from the httpbis group to provide input too.
We should be a bit further ourselves though :)
Evert
--
You received this message because you are subscribed to the Google Groups "PHP Standards Working Group" group.
To post to this group, send email to php-st...@googlegroups.com.
To unsubscribe from this group, send email to php-standard...@googlegroups.com.
2. API: I didn't include a Request object as i think its not really necessary. The proposal is expclicitly very simple.
/* PSR-HTTP-Client */use Whizbang\Client as PsrClient; // implements PsrClientInterfaceuse Whizbang\Request as PsrRequest; // implements PsrRequestInterface$psrClient = new PsrClient;$psrRequest = new PsrRequest();(PsrResponseInterface) $psrResponse = $psrClient->makeRequest($psrRequest);/* PSR-HTTP-SimpleClient */use Whizbang\SimpleClient as PsrSimpleClient; // implements PsrSimpleClientInterface$psrSimpleClient = new PsrSimpleClient;(PsrResponseInterface) $psrReponse = $psrSimpleClient->makeSimpleRequest(/* specialized set of simple arguments */);
Should the http client be bound to a host? so that $url is not containing a host? Or should the client wiggle this itself?
--
You received this message because you are subscribed to the Google Groups "PHP Standards Working Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/php-standards/-/CWSymx3hW2wJ.
Assuming this proposal comes to fruition, what's the expectation on existing HTTP clients? Are users expecting breaking changes, adapters, or something else?
interface ClientInterface
{
function send(RequestInterface $request, MessageInterface $response);
}
I do not agree with the Client/SimpleClient distinction.
namespace Fig\Psr\HttpClient;interface RequestInterface{/* TBD */}interface ResponseInterface{/* TBD */}interface ClientInterface{/*** @return ResponseInterface*/public function send(RequestInterface $request);}
namespace Fig\Psr\SimpleHttpClient;interface SimpleClientInterface{/*** @return \Fig\Psr\HttpClient\ResponseInterface*/public function request($method, $url, array $headers = array(), $content = null, array $options = array());}
I think we should work to create fairly generic interfaces that make no assumptions about the implementation details of an HTTP client vendor. I think we should strive to ensure that a PSR HTTP client consumer knows that when it is dealing with a client, request, or response object that the object's dependencies are already associated with the object. The long and short: a request represents a request, a response a response, and a client sends the requests and creates a response. A consumer shouldn't have to care how any of this is done.
I don't see the need for a distinction between browsers and clients when we're talking about a PSR HTTP client. I agree with what Beau said earlier: these HTTP client interfaces should be used to support dependency injection so that other libraries can utilize them in a generic way. I don't think that a PSR should concern itself with the way in which a client is built or instantiated, a request is instantiated, what request or response factories it uses, or the specific way in which a client transfers data over the wire. I would rather not separate the transport layer from the client (aka browser in Kris's example).
If a client interface contained a createRequest() method or something similar, then the way in which a request is created could be irrelevant to a PSR consumer. The underlying implementation is free to implement the the "createRequest()" method however deemed necessary -- implement factories, builders, or whatever. However, these implementation details should not creep into a PSR.
Some parts of the interfaces Kris posted are pretty similar to Guzzle, so I think we've got a good spring board here for discussion. (note: Guzzle's interfaces are a bit larger, but most of the differences are library requirement details specific to Guzzle). Speaking purely in the context of a PSR proposal, here's some feedback that I think would would mold these interfaces into a more generic PSR:
- I would not want to include "setMethod($method)" in a PSR request interface. This makes implementation assumptions and is something that could be handled in a createRequest() method of a client. Guzzle uses a RequestInterface for GET, HEAD, DELETE, etc; and an EntityEnclosingRequestInterface for PUT, POST, PATCH, etc.
- Just brainstorming, but could the "isSecure()" method be replaced by a more generic "getScheme()" method that returned "http", "https", etc?
- I think a PSR client should deal with headers using keys and values rather than passing the full HTTP header line. So getHeader($header), setHeader($header, $value), addHeader($header, $value), getHeaders(), setHeaders($headers), etc.
- I think we should be clear that headers should be specific to HTTP headers and not affect the start line of an HTTP message (examples of start lines are "GET / HTTP/1.1" for requests and "HTTP/1.1 200 OK" for responses). Allowing headers to change things like the request method is an implementation assumption that a HTTP vendor uses the same request classes for each type of method.
To unsubscribe from this group, send email to php-standards+unsubscribe@googlegroups.com.
On Thursday, June 7, 2012 12:54:47 PM UTC-5, Kris Wallsmith wrote:interface ClientInterface
{
function send(RequestInterface $request, MessageInterface $response);
}What are the benefits to passing in a $response vs having the object create it?
I do not agree with the Client/SimpleClient distinction.What part do you disagree with? That there would be a SimpleClient at all?Here is what I currently have in mind. I think that Client would be similar to Buzz Client interface and SimpleClient would be similar to Buzz Browser. Maybe it is the naming that is a bit off?PSR-HTTP-Client:namespace Fig\Psr\HttpClient;interface RequestInterface{/* TBD */}interface ResponseInterface{/* TBD */}interface ClientInterface{/*** @return ResponseInterface*/public function send(RequestInterface $request);}PSR-HTTP-SimpleClient (which would attempt to address Benjamin's "very simple HTTP client" use case leveraging the ResponseInterface from PSR-HTTP-Client):namespace Fig\Psr\SimpleHttpClient;interface SimpleClientInterface{/*** @return \Fig\Psr\HttpClient\ResponseInterface*/public function request($method, $url, array $headers = array(), $content = null, array $options = array());}Lots of options here (should they actually be in separate PSR from each other? do they need to be in separate classes or can send and request live together? should we have request at all?), but I see these as the building blocks to try and flesh out.
Having two client interfaces means a vendor needs to implement them both to be compatible? Providing two interfaces that accomplish the same functionality is unnecessarily confusing.
Hi Kris,> I agree with you 99% here except for the "client […] creates a response" bit.The reason I say this is because I think a PSR client consumer should not be concerned with how a request or response is created.
So, how can we achieve that? We could go nuts and write up interfaces for request factories, but I think that's overkill. We can't and should not specify the constructors of the request or response objects either. An alternative would be to have a method on a client used to create and return a request. Further, the client could execute the request and return a response interface object when a request is sent.To address your concerns of single responsibility, when implementing the PSR interface, your client object could internally delegate to a factory used for creating requests and responses. All of these implementation details would be internal to your implementation and should not concern the consumer of the PSR client.
> Why would you "rather not separate the transport layer from the client"? Buzz's client classes have a very specific responsibility: executing a request and populating a response. The client gets involved just-in-time and finishes as-soon-as-possible. The methods in Buzz's browser class are just sugar on top of an injected client.I think that works great for Buzz, but the transport of a client is an implementation detail of the client. Why should we put implementation details into a PSR interface? A PSR client consumer should not have to care at all how a request is being transferred over the wire, much like they shouldn't have to care if they're using Guzzle, Buzz, ZF, etc. I think that's the whole point of this PSR.So, to clarify and use Buzz as an example:Someone makes a library that requires a PSR client and expects a client to be injected somewhere in their library. Developer X wants to use Buzz, and Buzz supports different transports. They would build the Buzz client using whatever transport they want, inject the client into the browser, then pass the browser or some other object implementing the PSR interface into the library that requires the client. The client doesn't need to know anything other than the capabilities of the client, request, and responses.> I do not think the PSR should concern itself with how message objects are created.Agreed.> If setMethod() is not included, how do you set the method?In the constructor of a request object. If we add something like a ``createRequest($method, …blah)`` method, then a PSR client consumer can create requests as needed. Providing a way to create new request objects in this manner also allows for PSR specifications on sending requests in parallel (i.e. you grab 10 requests objects the send them at the same time using the client).> I've included this method in the Buzz interface so a cookie jar can determine whether to apply secure cookies to a particular request.Gotcha. In the context of a PSR, could someone just say ``if ($request->getScheme() == 'https')``? I'm fine with isSecure(), but a ``getScheme()`` method is still a good idea I think. Simply sending request to port 443 does not automatically mean you'll use SSL encryption, whereas the scheme can tell you if the request should be sent using SSL. It also helps creating URLs from a request object.
> I've designed Buzz to store header lines in a list in order to maintain the true order of headers. Maybe this is not important?I have not seen a case where the order of HTTP headers is important, but there might be edge cases. If this was truly a requirement, I think it could be implemented in other ways, so I think it's an implementation detail.
The only requirement I've seen is preserving the exact casing of headers. That sucks because HTTP says headers should be case insensitive, but unfortunately, some servers require headers in a specific case. I was able to handle this in Guzzle correctly, and it looks like what you've done would work for that as well.Thanks,Michael
Reply-To: <php-standards@googlegroups.com>
Date: Thu, 7 Jun 2012 14:08:33 -0700 (PDT)
Hi Michael,Thank you for your response. I look forward to discussing this with you.On Thursday, June 7, 2012 12:44:19 PM UTC-7, Michael Dowling wrote:I think we should work to create fairly generic interfaces that make no assumptions about the implementation details of an HTTP client vendor. I think we should strive to ensure that a PSR HTTP client consumer knows that when it is dealing with a client, request, or response object that the object's dependencies are already associated with the object. The long and short: a request represents a request, a response a response, and a client sends the requests and creates a response. A consumer shouldn't have to care how any of this is done.I agree with you 99% here except for the "client […] creates a response" bit.I don't see the need for a distinction between browsers and clients when we're talking about a PSR HTTP client. I agree with what Beau said earlier: these HTTP client interfaces should be used to support dependency injection so that other libraries can utilize them in a generic way. I don't think that a PSR should concern itself with the way in which a client is built or instantiated, a request is instantiated, what request or response factories it uses, or the specific way in which a client transfers data over the wire. I would rather not separate the transport layer from the client (aka browser in Kris's example).Why would you "rather not separate the transport layer from the client"? Buzz's client classes have a very specific responsibility: executing a request and populating a response. The client gets involved just-in-time and finishes as-soon-as-possible. The methods in Buzz's browser class are just sugar on top of an injected client.If a client interface contained a createRequest() method or something similar, then the way in which a request is created could be irrelevant to a PSR consumer. The underlying implementation is free to implement the the "createRequest()" method however deemed necessary -- implement factories, builders, or whatever. However, these implementation details should not creep into a PSR.I do not think the PSR should concern itself with how message objects are created.Some parts of the interfaces Kris posted are pretty similar to Guzzle, so I think we've got a good spring board here for discussion. (note: Guzzle's interfaces are a bit larger, but most of the differences are library requirement details specific to Guzzle). Speaking purely in the context of a PSR proposal, here's some feedback that I think would would mold these interfaces into a more generic PSR:
- I would not want to include "setMethod($method)" in a PSR request interface. This makes implementation assumptions and is something that could be handled in a createRequest() method of a client. Guzzle uses a RequestInterface for GET, HEAD, DELETE, etc; and an EntityEnclosingRequestInterface for PUT, POST, PATCH, etc.
If setMethod() is not included, how do you set the method?
- Just brainstorming, but could the "isSecure()" method be replaced by a more generic "getScheme()" method that returned "http", "https", etc?
I've included this method in the Buzz interface so a cookie jar can determine whether to apply secure cookies to a particular request.
- I think a PSR client should deal with headers using keys and values rather than passing the full HTTP header line. So getHeader($header), setHeader($header, $value), addHeader($header, $value), getHeaders(), setHeaders($headers), etc.
This is the main issue to be resolved before proposing request and response interfaces. I've designed Buzz to store header lines in a list in order to maintain the true order of headers. Maybe this is not important?
- I think we should be clear that headers should be specific to HTTP headers and not affect the start line of an HTTP message (examples of start lines are "GET / HTTP/1.1" for requests and "HTTP/1.1 200 OK" for responses). Allowing headers to change things like the request method is an implementation assumption that a HTTP vendor uses the same request classes for each type of method.
That's a good point. I see now that the HTTP spec distinguishes between the request line and headers.Thanks!Kris
- Guzzle uses "addHeader($header, $value)" to add a header to a message. If a header already exists, then the new value is appended to the existing header. If the header does not exist, then the value is added. "setHeader($key, $value)" is used to add a header to a message and replace any existing headers by that name. Everything is handled case-insensitively.
- I think there should be a proper response interface that has methods like getStatusCode() and getReasonPhrase(). Both Guzzle and Buzz use these same method names.
- Can/should a PSR interface account for the ability to send HTTP requests in parallel?
-Michael
So, how can we achieve that? We could go nuts and write up interfaces for request factories, but I think that's overkill. We can't and should not specify the constructors of the request or response objects either. An alternative would be to have a method on a client used to create and return a request. Further, the client could execute the request and return a response interface object when a request is sent.To address your concerns of single responsibility, when implementing the PSR interface, your client object could internally delegate to a factory used for creating requests and responses. All of these implementation details would be internal to your implementation and should not concern the consumer of the PSR client.
I'm willing to go either way on this point. Does anyone else have an opinion?
namespace Fig\Psr\HttpClient;interface ClientInterface{/*** @return RequestInterface*/public function createRequest($method, $url, array $headers = array(), $content = null);
/*** @return ResponseInterface*/
public function sendRequest(RequestInterface $request);
/*** @return ResponseInterface*/
public function request($method, $url, array $headers = array(), $content = null);}
namespace Buzz\PsrHttpClient;class Client implements \Fig\Psr\ClientInterface{public function __construct(\Buzz\Client\ClientInterface $client){$this->client = $client;}public function createRequest($method, $url, array $headers = array(), $content = null){// Construct the PSR Request however makes sense for Buzz// ... the set* methods may not be a part of PSR Request// but that does not mean Buzz implementation cannot use// them. Implementation detail.$request = new \Buzz\PsrHttpClient\Request;$request->setMethod($method);$request->setUrl($url);$request->setHeaders($headers);$request->setContent($content);}public function sendRequest(RequestInterface $request){// Use util... or could be done inline here, brevity//// If Buzz Client ever accepts PSR Request natively// this conversion can be skipped.$buzzRequest = \Buzz\PsrHttpClient\Util::convertPsrRequestToBuzzRequest($request);$buzzResponse = new \Buzz\Message\Response;$this->client->send($buzzRequest, $buzzResponse);// Use util... or could be done inline here, brevity//// If \Buzz\Message\Response ever implements PSR Response// it can just be returned at this point.//// @return \Buzz\PsrHttpClient\Responsereturn \Buzz\PsrHttpClient\Util::convertBuzzResponseToPsrResponse($buzzResponse);}public function request($method, $url, array $headers = array(), $content = null){// boilerplate — conveniently mimics Benjamin's original proposalreturn $this->sendRequest($this->createRequest($method, $url, $headers, $content, $options));}}
--
You received this message because you are subscribed to the Google Groups "PHP Standards Working Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/php-standards/-/VIOGwnTDjqsJ.
To unsubscribe from this group, send email to php-standard...@googlegroups.com.
To unsubscribe from this group, send email to php-standards+unsubscribe@googlegroups.com.
> To unsubscribe from this group, send email to php-standards+unsubscribe@googlegroups.com.
interface Client
{
function get($url, array $headers = array());
function post($url, $content = null, array $headers = array());
function request($method, $url, $content = null, array $headers = array());
}
To view this discussion on the web visit https://groups.google.com/d/msg/php-standards/-/VA2B03Q3hU0J.
To unsubscribe from this group, send email to php-standard...@googlegroups.com.
Questions:See https://github.com/php-fig/fig-standards/pull/24
From the introduction:
Many libraries and applications require an HTTP client to talk to other servers. In general all these libraries either ship their own HTTP client library, or use low-level PHP functionality such as
file_get_contents
, ext/curl or the ext/socket. Depending on the use-cases there are very tricky implementation details to be handled such as proxies, SSL, authentication protocols and many more. Not every small library can afford to implement all the different details. However there are only a few http client libraries that are widely used between different projects, because of NIH or fears of vendor lock-in.Motivation:
Doctrine has about 4 projects that need an HTTP client. Currently every projects implements them itself, which is annoying. We could abstract this into our "Common" library, however that would mean we would start being a "http client" vendor. Now personally, i don't care about http clients and would rather let others do this, however i also don't want to face vendor lock-in by deciding for any of the many http clients. In a perfect world (with this standard) Doctrine could ship one very simple http client using sockets, and if anyone needs something more awesome, he could just use any other provider of a PSR http client.
1. Do the voting members think this is something to standardize?
2. API: I didn't include a Request object as i think its not really necessary. The proposal is expclicitly very simple.
3. How to proceed?
4. Feedback?
greetings,
Benjamin
> 4. [...] It should be recommended to follow redirects by default. I can still see that this is an implementation detail, but this should be mentioned.
>
> Seems logical, but I could see some consumers wanting the ability to handle redirects manually (for whatever reason). This could be considered an implementation detail that a PSR consumer could mention in their documentation what expectation it has for how PSR clients handle redirection.
Actually.. I disagree here. The main problem we're solving is a standard Client interface that everybody can use.
I think it's fair for a user of such a client to expect, when they make a request that redirects are followed.
If this is not the case, then the consumer of the Client interface can no longer rely on it's correct behaviour.
Redirecting is a fundamental part of how the web works.
It's a Bad Thing™ for me as a developer of webservices that I cannot rely on consumers to not break when I redirect them to a new location.
Since the primary target audience is likely going to be consumers of web services, it's pretty important to push for the 'correct thing'.
Out of curiosity, where does this proposal stand. In an off list discussion I heard it was dead and until a couple days ago there wasn't any activity. But, there are new comments and some new emails.I'm interested in this topic if there is going to be movement on this and would participate. But, if it's dead I don't want to put in the work.Note, this is not something I am saying needs to be a FIG standard. I'm just saying that if it is going to be pursued I'll participate.