# AbstractRestReponse childs does not have addHeader available!?

**URL:** https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074
**Category:** Elasticsearch
**Created:** [May 22, 2013, 1:37pm UTC](https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074 "2013-05-22T13:37:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_G\_Ortega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_g_ortega/32/46359_2.png) [@David\_G\_Ortega](https://discuss.elastic.co/u/David_G_Ortega)
#### Post date: [May 22, 2013, 1:37pm UTC](https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074/1 "2013-05-22T13:37:13Z")

</div>

Hi guys, Im doing this

BytesRestResponse bresponse = new BytesRestResponse(binary,  
\_mimes.get(format) );  
channel.sendResponse(bresponse);

and its ok but I want to use custom headers and I have seen that  
AbstractRestResponse has a method addHeader(String, String)

but none of the abstract class childs has the method already available.  
Why? the method is public...

bresponse.addHeader("test", "test"); claims to not be there

Im using 0.90 and 0.19 src

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 22, 2013, 2:31pm UTC](https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074/2 "2013-05-22T14:31:05Z")

</div>

Hey,

First, it is sufficient to ask your question only once.  
Second, you have been checking out the 0.90 branch. The branch is the  
preparation branch for the next 0.90 release and does not map with the  
current 0.90.0 release. If you need to check, whether a feature is in a  
certain release, check out the relevant tag via 'git checkout v0.90.0' - if  
you do this, you will see, that the feature of setting headers is not  
included in that tag.

Regarding 0.19 you do not have any option except backporting the patch  
yourself and building & running a custom elasticsearch version.

Hope this helps

--Alex

On Wed, May 22, 2013 at 3:37 PM, David G Ortega [g.ortega.david@gmail.com](mailto:g.ortega.david@gmail.com)wrote:

> Hi guys, Im doing this
> 
> BytesRestResponse bresponse = new BytesRestResponse(binary,  
> \_mimes.get(format) );  
> channel.sendResponse(bresponse);
> 
> and its ok but I want to use custom headers and I have seen that  
> AbstractRestResponse has a method addHeader(String, String)
> 
> but none of the abstract class childs has the method already available.  
> Why? the method is public...
> 
> bresponse.addHeader("test", "test"); claims to not be there
> 
> Im using 0.90 and 0.19 src
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![David\_G\_Ortega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_g_ortega/32/46359_2.png) [@David\_G\_Ortega](https://discuss.elastic.co/u/David_G_Ortega)
#### Post date: [May 22, 2013, 2:54pm UTC](https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074/3 "2013-05-22T14:54:58Z")

</div>

Hi Alex,

thanks for the reply.  
I have posted twice just because google took so long to post the first one  
that I thought that I accidentally discarded the post instead of submitting  
it.  
Im not a Github user, I mean Im in but I dont use their repo (I use  
bitbucket), so I can not say why I cant see ALL the branches in github but  
If I clone the project using intellij with the url thats what I have, no  
more than that...

Is there any plan to update the release soon or I have to build it?

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 2:35am UTC](https://discuss.elastic.co/t/abstractrestreponse-childs-does-not-have-addheader-available/12074/4 "2017-07-06T02:35:23Z")

</div>


