You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2015/12/19 17:52:04 UTC
response.getStatusLine().getStatusCode() shorthand
Hi All,
There are a lot of places where we say:
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: response.getStatusLine().getStatusCode() shorthand
Posted by Gary Gregory <ga...@gmail.com>.
OK, I just did the getCode() bit.
Gary
On Sat, Dec 19, 2015 at 9:18 AM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sat, 2015-12-19 at 09:08 -0800, Gary Gregory wrote:
> > On Sat, Dec 19, 2015 at 9:04 AM, Oleg Kalnichevski <ol...@apache.org>
> wrote:
> >
> > > On Sat, 2015-12-19 at 08:54 -0800, Gary Gregory wrote:
> > > > Hi All,
> > > >
> > > > There are a lot of places where we say:
> > > >
> > > > response.getStatusLine().getStatusCode()
> > > >
> > > > Should we have a short cut
> > > >
> > > > response.getStatusCode()
> > >
> > > HttpResponse#getCode might do as well.
> > >
> >
> > Sounds good.
> >
> > This:
> >
> > > response.getStatusLine().getStatusCode()
> >
> > could also be:
> >
> > > response.getStatusLine().getCode()
> >
> > Since there is only one kind of code in a status line.
> >
> > But I am not sure that's worth it.
> >
>
> Probably not.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: response.getStatusLine().getStatusCode() shorthand
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sat, 2015-12-19 at 09:08 -0800, Gary Gregory wrote:
> On Sat, Dec 19, 2015 at 9:04 AM, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> > On Sat, 2015-12-19 at 08:54 -0800, Gary Gregory wrote:
> > > Hi All,
> > >
> > > There are a lot of places where we say:
> > >
> > > response.getStatusLine().getStatusCode()
> > >
> > > Should we have a short cut
> > >
> > > response.getStatusCode()
> >
> > HttpResponse#getCode might do as well.
> >
>
> Sounds good.
>
> This:
>
> > response.getStatusLine().getStatusCode()
>
> could also be:
>
> > response.getStatusLine().getCode()
>
> Since there is only one kind of code in a status line.
>
> But I am not sure that's worth it.
>
Probably not.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: response.getStatusLine().getStatusCode() shorthand
Posted by Gary Gregory <ga...@gmail.com>.
On Sat, Dec 19, 2015 at 9:04 AM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sat, 2015-12-19 at 08:54 -0800, Gary Gregory wrote:
> > Hi All,
> >
> > There are a lot of places where we say:
> >
> > response.getStatusLine().getStatusCode()
> >
> > Should we have a short cut
> >
> > response.getStatusCode()
>
> HttpResponse#getCode might do as well.
>
Sounds good.
This:
> response.getStatusLine().getStatusCode()
could also be:
> response.getStatusLine().getCode()
Since there is only one kind of code in a status line.
But I am not sure that's worth it.
Thoughts?
Gary
>
> By the way in HTTP/2 there is no longer such thing as a response status
> line or a request line, so this problem would likely get resolved in the
> course of HTTP/2 development anyway.
>
> Oleg
>
>
> >
> > ?
> >
> > In Core alone, there are 64 such instances.
> >
> > Gary
> >
> > On Sat, Dec 19, 2015 at 8:52 AM, Gary Gregory <ga...@gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > There are a lot of places where we say:
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <http://www.manning.com/bauer3/>
> > > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > > Spring Batch in Action <http://www.manning.com/templier/>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: response.getStatusLine().getStatusCode() shorthand
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sat, 2015-12-19 at 08:54 -0800, Gary Gregory wrote:
> Hi All,
>
> There are a lot of places where we say:
>
> response.getStatusLine().getStatusCode()
>
> Should we have a short cut
>
> response.getStatusCode()
HttpResponse#getCode might do as well.
By the way in HTTP/2 there is no longer such thing as a response status
line or a request line, so this problem would likely get resolved in the
course of HTTP/2 development anyway.
Oleg
>
> ?
>
> In Core alone, there are 64 such instances.
>
> Gary
>
> On Sat, Dec 19, 2015 at 8:52 AM, Gary Gregory <ga...@gmail.com>
> wrote:
>
> > Hi All,
> >
> > There are a lot of places where we say:
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: response.getStatusLine().getStatusCode() shorthand
Posted by Gary Gregory <ga...@gmail.com>.
Hi All,
There are a lot of places where we say:
response.getStatusLine().getStatusCode()
Should we have a short cut
response.getStatusCode()
?
In Core alone, there are 64 such instances.
Gary
On Sat, Dec 19, 2015 at 8:52 AM, Gary Gregory <ga...@gmail.com>
wrote:
> Hi All,
>
> There are a lot of places where we say:
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory