You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Challen He <ch...@microsoft.com> on 2014/07/16 05:31:51 UTC

RE: Add HTTP header to all requests (Olingo 4)

+ user@olingo.apache.org<ma...@olingo.apache.org>


Thanks,-Challen

From: odata-discussion@googlegroups.com [mailto:odata-discussion@googlegroups.com] On Behalf Of Elliott, Anthony (LNG-RDU)
Sent: 2014年7月16日 2:48
To: odata-discussion@googlegroups.com
Subject: [OData Discussion] Add HTTP header to all requests (Olingo 4)

Hi all,

How should I go about adding an Authorization header to all HTTP requests from my Olingo client?  I currently have my own implementation of RetreiveRequestFactory add the header in each method there (e.g. `getEntitySetRequest`).  Is there a spot where I could do this and only need to do it once?

Thanks,
Anthony
--
You received this message because you are subscribed to the Google Groups "OData Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to odata-discussion+unsubscribe@googlegroups.com<ma...@googlegroups.com>.
To post to this group, send email to odata-discussion@googlegroups.com<ma...@googlegroups.com>.
Visit this group at http://groups.google.com/group/odata-discussion.
To view this discussion on the web visit https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116D0CA3039E2307%40RETDAYMBXP002.legal.regn.net<https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116D0CA3039E2307%40RETDAYMBXP002.legal.regn.net?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

Re: Add HTTP header to all requests (Olingo 4)

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Anthony,
we have recently added client support for OAuth2 as part of OLINGO-362 
[1]; basically the idea is to provide a subclass of 
AbstractOAuth2HttpUriRequestFactory which contains the specific logic 
for obtaining and providing an access token (see [3] for a CXF-based 
example).

When providing an alternative HttpUriRequestFactory there is no need to 
provide a HttpClientFactory setting an HttpRequestInterceptor; anyway, I 
don't see any problem in your solution.

Regards.

[1] https://issues.apache.org/jira/browse/OLINGO-362
[2] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=blob;f=lib/client-core/src/main/java/org/apache/olingo/client/core/http/AbstractOAuth2HttpUriRequestFactory.java
[3] 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=blob;f=fit/src/test/java/org/apache/olingo/fit/CXFOAuth2HttpUriRequestFactory.java

On 16/07/2014 19:47, Elliott, Anthony (LNG-RDU) wrote:
> Looks like I misspoke a bit, I'm using OAuth so if the end-user has an OAuth access token then I need to add an Authorization: Bearer {access-code} header to all requests.  However, if the end user does not have an access token then I do not want to add this header.
>
> I'm continuing to look around and found out that the DefaultHttpClient allows me to add a request interceptor which seems to do what I want.  I extended ProxyWrapperHttpClientFactory and overrode the createHttpClient function with the below code for anyone who had the same question or to let me know if I'm doing something wrong.  I just have to deal with updating the OAuth token in this Factory now but it worked for the limited scenarios that I tested thus far.
>
> Thanks,
> Anthony
>
> -------
>
> @Override
> public HttpClient createHttpClient(HttpMethod method, URI uri) {
>      DefaultHttpClient client = (DefaultHttpClient) super.createHttpClient(method, uri);
>      client.addRequestInterceptor(new HttpRequestInterceptor() {
>          @Override
>          public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException {
>              httpRequest.addHeader("Authorization", "Bearer " + token.getAccess_token());
>          }
>      });
>      return client;
> }
>
> -----Original Message-----
> From: Francesco Chicchiriccò [mailto:francesco.chicchiricco@tirasa.net]
> Sent: Wednesday, July 16, 2014 5:37 AM
> To: user@olingo.apache.org
> Subject: R: Re: Add HTTP header to all requests (Olingo 4)
>
> Hi Michael,
> you are right: I have just rebuilt everything successfully.
>
> Thanks for reporting.
> Regards.
>
> ----- Michael Bolz <mi...@sap.com> ha scritto:
>> Hi,
>>
>> With this commit:
>> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commitdi
>> ff;h=c
>> 541d9251b4ee36442cfdf9b18984892c1d2b819
>> were several dependencies added.
>>
>> But the "cxf-rt-rs-extension-providers" and "jettison" seems to be
>> unused so that I have removed them.
>> @Francesco: Can you please confirm that the dependencies are not used?
>>
>> Commit:
>> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h
>> =7e6ed
>> f20c0188ea3a434fbe6f70133486db51851
>> and Conclusion:
>> -      <groupId>org.apache.cxf</groupId>
>> -      <artifactId>cxf-rt-rs-extension-providers</artifactId>
>> -    </dependency>
>> -    <dependency>
>> -      <groupId>org.codehaus.jettison</groupId>
>> -      <artifactId>jettison</artifactId>
>> -      <version>1.3.5</version>
>> -    </dependency>
>> -    <dependency>
>>
>>
>>
>> Kind regards,
>> Michael
>>
>> From:  Francesco Chicchiriccò <il...@apache.org>
>> Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>
>> Date:  Mittwoch, 16. Juli 2014 09:58
>> To:  "user@olingo.apache.org" <us...@olingo.apache.org>, "Elliott,
>> Anthony (LNG-RDU)" <an...@lexisnexis.com>,
>> "odata-discussion@googlegroups.com"
>> <od...@googlegroups.com>
>> Subject:  Re: Add HTTP header to all requests (Olingo 4)
>>
>> Hi all,
>> the way to add HTTP Basic Authentication support to an OData 4.0
>> client instance is as follows:
>>
>> (if using olingo-client-core)
>> client.getConfiguration().setHttpClientFactory(new
>> BasicAuthHttpClientFactory("username", "password"));
>>
>> (if using olingo-client-proxy)
>> entityContainerFactory.getClient().getConfiguration().setHttpClientFac
>> tory(n ew BasicAuthHttpClientFactory("username", "password"));
>>
>> HTH
>> Regards.
>>
>> On 16/07/2014 05:31, Challen He wrote:
>>> + user@olingo.apache.org <ma...@olingo.apache.org>
>>>
>>>   
>>>   
>>> Thanks,-Challen
>>>   
>>>
>>> From: odata-discussion@googlegroups.com
>>> [mailto:odata-discussion@googlegroups.com] On Behalf Of Elliott,
>>> Anthony
>>> (LNG-RDU)
>>> Sent: 2014年7月16日 2:48
>>> To: odata-discussion@googlegroups.com
>>> Subject: [OData Discussion] Add HTTP header to all requests (Olingo
>>> 4)
>>>   
>>> Hi all,
>>>   
>>> How should I go about adding an Authorization header to all HTTP
>>> requests from my Olingo client?  I currently have my own
>>> implementation of RetreiveRequestFactory add the header in each method there (e.g.
>>> `getEntitySetRequest`).  Is there a spot where I could do this and
>>> only need to do it once?
>>>   
>>> Thanks,
>>> Anthony

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


RE: Re: Add HTTP header to all requests (Olingo 4)

Posted by "Elliott, Anthony (LNG-RDU)" <an...@lexisnexis.com>.
Looks like I misspoke a bit, I'm using OAuth so if the end-user has an OAuth access token then I need to add an Authorization: Bearer {access-code} header to all requests.  However, if the end user does not have an access token then I do not want to add this header.

I'm continuing to look around and found out that the DefaultHttpClient allows me to add a request interceptor which seems to do what I want.  I extended ProxyWrapperHttpClientFactory and overrode the createHttpClient function with the below code for anyone who had the same question or to let me know if I'm doing something wrong.  I just have to deal with updating the OAuth token in this Factory now but it worked for the limited scenarios that I tested thus far.

Thanks,
Anthony

-------

@Override
public HttpClient createHttpClient(HttpMethod method, URI uri) {
    DefaultHttpClient client = (DefaultHttpClient) super.createHttpClient(method, uri);
    client.addRequestInterceptor(new HttpRequestInterceptor() {
        @Override
        public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException {
            httpRequest.addHeader("Authorization", "Bearer " + token.getAccess_token());
        }
    });
    return client;
}

-----Original Message-----
From: Francesco Chicchiriccò [mailto:francesco.chicchiricco@tirasa.net] 
Sent: Wednesday, July 16, 2014 5:37 AM
To: user@olingo.apache.org
Subject: R: Re: Add HTTP header to all requests (Olingo 4)

Hi Michael,
you are right: I have just rebuilt everything successfully.

Thanks for reporting.
Regards.

----- Michael Bolz <mi...@sap.com> ha scritto:
> Hi,
> 
> With this commit: 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commitdi
> ff;h=c
> 541d9251b4ee36442cfdf9b18984892c1d2b819
> were several dependencies added.
> 
> But the "cxf-rt-rs-extension-providers" and "jettison" seems to be 
> unused so that I have removed them.
> @Francesco: Can you please confirm that the dependencies are not used?
> 
> Commit: 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h
> =7e6ed
> f20c0188ea3a434fbe6f70133486db51851
> and Conclusion:
> -      <groupId>org.apache.cxf</groupId>
> -      <artifactId>cxf-rt-rs-extension-providers</artifactId>
> -    </dependency>
> -    <dependency>
> -      <groupId>org.codehaus.jettison</groupId>
> -      <artifactId>jettison</artifactId>
> -      <version>1.3.5</version>
> -    </dependency> 
> -    <dependency>
> 
> 
> 
> Kind regards,
> Michael
> 
> From:  Francesco Chicchiriccò <il...@apache.org>
> Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>
> Date:  Mittwoch, 16. Juli 2014 09:58
> To:  "user@olingo.apache.org" <us...@olingo.apache.org>, "Elliott, 
> Anthony (LNG-RDU)" <an...@lexisnexis.com>, 
> "odata-discussion@googlegroups.com" 
> <od...@googlegroups.com>
> Subject:  Re: Add HTTP header to all requests (Olingo 4)
> 
> Hi all,
> the way to add HTTP Basic Authentication support to an OData 4.0 
> client instance is as follows:
> 
> (if using olingo-client-core)
> client.getConfiguration().setHttpClientFactory(new
> BasicAuthHttpClientFactory("username", "password"));
> 
> (if using olingo-client-proxy)
> entityContainerFactory.getClient().getConfiguration().setHttpClientFac
> tory(n ew BasicAuthHttpClientFactory("username", "password"));
> 
> HTH
> Regards.
> 
> On 16/07/2014 05:31, Challen He wrote:
> > + user@olingo.apache.org <ma...@olingo.apache.org>
> > 
> >  
> >  
> > Thanks,-Challen
> >  
> > 
> > From: odata-discussion@googlegroups.com 
> > [mailto:odata-discussion@googlegroups.com] On Behalf Of Elliott, 
> > Anthony
> > (LNG-RDU)
> > Sent: 2014年7月16日 2:48
> > To: odata-discussion@googlegroups.com
> > Subject: [OData Discussion] Add HTTP header to all requests (Olingo 
> > 4)
> >  
> > Hi all,
> >  
> > How should I go about adding an Authorization header to all HTTP 
> > requests from my Olingo client?  I currently have my own 
> > implementation of RetreiveRequestFactory add the header in each method there (e.g.
> > `getEntitySetRequest`).  Is there a spot where I could do this and 
> > only need to do it once?
> >  
> > Thanks,
> > Anthony
> > --
> > You received this message because you are subscribed to the Google 
> > Groups "OData Discussion" group.
> > To unsubscribe from this group and stop receiving emails from it, 
> > send an email to odata-discussion+unsubscribe@googlegroups.com
> > <ma...@googlegroups.com> .
> > To post to this group, send email to 
> > odata-discussion@googlegroups.com <ma...@googlegroups.com> .
> > Visit this group at http://groups.google.com/group/odata-discussion
> > <http://groups.google.com/group/odata-discussion> .
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA
> > 7F825A9116 D0CA3039E2307%40RETDAYMBXP002.legal.regn.net
> > <https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984E
> > A7F825A911 
> > 6D0CA3039E2307%40RETDAYMBXP002.legal.regn.net?utm_medium=email&utm_s
> > ource=foot
> > er> .
> > For more options, visit https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout> .
> --
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC 
> http://people.apache.org/~ilgrosso/ 
> <http://people.apache.org/%7Eilgrosso/>
> 
> 

--
Dott. Francesco Chicchiriccò
Tel +393290573276

Amministratore unico @ Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC http://people.apache.org/~ilgrosso/

"To Iterate is Human, to Recurse, Divine"
(James O. Coplien, Bell Labs)

R: Re: Add HTTP header to all requests (Olingo 4)

Posted by Francesco Chicchiriccò <fr...@tirasa.net>.
Hi Michael,
you are right: I have just rebuilt everything successfully.

Thanks for reporting.
Regards.

----- Michael Bolz <mi...@sap.com> ha scritto:
> Hi, 
> 
> With this commit: 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commitdiff;h=c
> 541d9251b4ee36442cfdf9b18984892c1d2b819
> were several dependencies added.
> 
> But the "cxf-rt-rs-extension-providers" and "jettison" seems to be unused so
> that I have removed them.
> @Francesco: Can you please confirm that the dependencies are not used?
> 
> Commit: 
> https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=7e6ed
> f20c0188ea3a434fbe6f70133486db51851
> and Conclusion:
> -      <groupId>org.apache.cxf</groupId>
> -      <artifactId>cxf-rt-rs-extension-providers</artifactId>
> -    </dependency>
> -    <dependency>
> -      <groupId>org.codehaus.jettison</groupId>
> -      <artifactId>jettison</artifactId>
> -      <version>1.3.5</version>
> -    </dependency> 
> -    <dependency>
> 
> 
> 
> Kind regards,
> Michael
> 
> From:  Francesco Chicchiriccò <il...@apache.org>
> Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>
> Date:  Mittwoch, 16. Juli 2014 09:58
> To:  "user@olingo.apache.org" <us...@olingo.apache.org>, "Elliott, Anthony
> (LNG-RDU)" <an...@lexisnexis.com>,
> "odata-discussion@googlegroups.com" <od...@googlegroups.com>
> Subject:  Re: Add HTTP header to all requests (Olingo 4)
> 
> Hi all,
> the way to add HTTP Basic Authentication support to an OData 4.0 client
> instance is as follows:
> 
> (if using olingo-client-core)
> client.getConfiguration().setHttpClientFactory(new
> BasicAuthHttpClientFactory("username", "password"));
> 
> (if using olingo-client-proxy)
> entityContainerFactory.getClient().getConfiguration().setHttpClientFactory(n
> ew BasicAuthHttpClientFactory("username", "password"));
> 
> HTH
> Regards.
> 
> On 16/07/2014 05:31, Challen He wrote:
> > + user@olingo.apache.org <ma...@olingo.apache.org>
> > 
> >  
> >  
> > Thanks,-Challen
> >  
> > 
> > From: odata-discussion@googlegroups.com
> > [mailto:odata-discussion@googlegroups.com] On Behalf Of Elliott, Anthony
> > (LNG-RDU)
> > Sent: 2014年7月16日 2:48
> > To: odata-discussion@googlegroups.com
> > Subject: [OData Discussion] Add HTTP header to all requests (Olingo 4)
> >  
> > Hi all,
> >  
> > How should I go about adding an Authorization header to all HTTP requests from
> > my Olingo client?  I currently have my own implementation of
> > RetreiveRequestFactory add the header in each method there (e.g.
> > `getEntitySetRequest`).  Is there a spot where I could do this and only need
> > to do it once?
> >  
> > Thanks,
> > Anthony
> > -- 
> > You received this message because you are subscribed to the Google Groups
> > "OData Discussion" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to odata-discussion+unsubscribe@googlegroups.com
> > <ma...@googlegroups.com> .
> > To post to this group, send email to odata-discussion@googlegroups.com
> > <ma...@googlegroups.com> .
> > Visit this group at http://groups.google.com/group/odata-discussion
> > <http://groups.google.com/group/odata-discussion> .
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116
> > D0CA3039E2307%40RETDAYMBXP002.legal.regn.net
> > <https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A911
> > 6D0CA3039E2307%40RETDAYMBXP002.legal.regn.net?utm_medium=email&utm_source=foot
> > er> .
> > For more options, visit https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout> .
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC
> http://people.apache.org/~ilgrosso/ <http://people.apache.org/%7Eilgrosso/>
> 
> 

-- 
Dott. Francesco Chicchiriccò
Tel +393290573276

Amministratore unico @ Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

"To Iterate is Human, to Recurse, Divine"
(James O. Coplien, Bell Labs)

Re: Add HTTP header to all requests (Olingo 4)

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi, 

With this commit: 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commitdiff;h=c
541d9251b4ee36442cfdf9b18984892c1d2b819
were several dependencies added.

But the "cxf-rt-rs-extension-providers" and "jettison" seems to be unused so
that I have removed them.
@Francesco: Can you please confirm that the dependencies are not used?

Commit: 
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=7e6ed
f20c0188ea3a434fbe6f70133486db51851
and Conclusion:
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-extension-providers</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jettison</groupId>
-      <artifactId>jettison</artifactId>
-      <version>1.3.5</version>
-    </dependency> 
-    <dependency>



Kind regards,
Michael

From:  Francesco Chicchiriccò <il...@apache.org>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Date:  Mittwoch, 16. Juli 2014 09:58
To:  "user@olingo.apache.org" <us...@olingo.apache.org>, "Elliott, Anthony
(LNG-RDU)" <an...@lexisnexis.com>,
"odata-discussion@googlegroups.com" <od...@googlegroups.com>
Subject:  Re: Add HTTP header to all requests (Olingo 4)

Hi all,
the way to add HTTP Basic Authentication support to an OData 4.0 client
instance is as follows:

(if using olingo-client-core)
client.getConfiguration().setHttpClientFactory(new
BasicAuthHttpClientFactory("username", "password"));

(if using olingo-client-proxy)
entityContainerFactory.getClient().getConfiguration().setHttpClientFactory(n
ew BasicAuthHttpClientFactory("username", "password"));

HTH
Regards.

On 16/07/2014 05:31, Challen He wrote:
> + user@olingo.apache.org <ma...@olingo.apache.org>
> 
>  
>  
> Thanks,-Challen
>  
> 
> From: odata-discussion@googlegroups.com
> [mailto:odata-discussion@googlegroups.com] On Behalf Of Elliott, Anthony
> (LNG-RDU)
> Sent: 2014年7月16日 2:48
> To: odata-discussion@googlegroups.com
> Subject: [OData Discussion] Add HTTP header to all requests (Olingo 4)
>  
> Hi all,
>  
> How should I go about adding an Authorization header to all HTTP requests from
> my Olingo client?  I currently have my own implementation of
> RetreiveRequestFactory add the header in each method there (e.g.
> `getEntitySetRequest`).  Is there a spot where I could do this and only need
> to do it once?
>  
> Thanks,
> Anthony
> -- 
> You received this message because you are subscribed to the Google Groups
> "OData Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to odata-discussion+unsubscribe@googlegroups.com
> <ma...@googlegroups.com> .
> To post to this group, send email to odata-discussion@googlegroups.com
> <ma...@googlegroups.com> .
> Visit this group at http://groups.google.com/group/odata-discussion
> <http://groups.google.com/group/odata-discussion> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116
> D0CA3039E2307%40RETDAYMBXP002.legal.regn.net
> <https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A911
> 6D0CA3039E2307%40RETDAYMBXP002.legal.regn.net?utm_medium=email&utm_source=foot
> er> .
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> .
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/ <http://people.apache.org/%7Eilgrosso/>



Re: Add HTTP header to all requests (Olingo 4)

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi all,
the way to add HTTP Basic Authentication support to an OData 4.0 client
instance is as follows:

(if using olingo-client-core)
client.getConfiguration().setHttpClientFactory(new
BasicAuthHttpClientFactory("username", "password"));

(if using olingo-client-proxy)
entityContainerFactory.getClient().getConfiguration().setHttpClientFactory(new
BasicAuthHttpClientFactory("username", "password"));

HTH
Regards.

On 16/07/2014 05:31, Challen He wrote:
>
> + user@olingo.apache.org <ma...@olingo.apache.org>
>
> Thanks,-Challen
>
> *From:*odata-discussion@googlegroups.com
> [mailto:odata-discussion@googlegroups.com] *On Behalf Of *Elliott,
> Anthony (LNG-RDU)
> *Sent:* 2014年7月16日2:48
> *To:* odata-discussion@googlegroups.com
> *Subject:* [OData Discussion] Add HTTP header to all requests (Olingo 4)
>
> Hi all,
>
> How should I go about adding an Authorization header to all HTTP
> requests from my Olingo client? I currently have my own implementation
> of RetreiveRequestFactory add the header in each method there (e.g.
> `getEntitySetRequest`). Is there a spot where I could do this and only
> need to do it once?
>
> Thanks,
>
> Anthony
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "OData Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to odata-discussion+unsubscribe@googlegroups.com
> <ma...@googlegroups.com>.
> To post to this group, send email to odata-discussion@googlegroups.com
> <ma...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/odata-discussion.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116D0CA3039E2307%40RETDAYMBXP002.legal.regn.net
> <https://groups.google.com/d/msgid/odata-discussion/F4F4A8C98680984EA7F825A9116D0CA3039E2307%40RETDAYMBXP002.legal.regn.net?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/