Must give credit where credit is due. Thanks Rob, Claude, and Arthur for
your suggestions. I decided to go with Rob's initial suggestion. That was
the least intrusive. In case anyone else is struggling with this what I did
was the following :
1. extended AbstractCredentialsAuthenticator similar to SimpleAuthenticator
2. Overrided (that just doesn't sound right in my head) the apply method.
@Override
public void apply(AbstractHttpClient client, HttpContext context, URI
target){
super.apply(client,context, target);
HttpRequestInterceptor requestInterceptor = (httpRequest, httpContext)
->
httpRequest.addHeader("CUSTOM_HEADER","SOME_INFO");
client.addRequestInterceptor(requestInterceptor);
}
This works as expected. Thanks everyone for your assistance.
On Tue, Jan 27, 2015 at 8:08 AM, Trevor Donaldson <[email protected]>
wrote:
> Ok, will do.
>
> On Tue, Jan 27, 2015 at 8:07 AM, Claude Warren <[email protected]> wrote:
>
>> Trevor,
>>
>> If you're digging around in the code to figure out how to do this, then
>> submit your changes as a fix to allow it.
>>
>> On Tue, Jan 27, 2015 at 1:04 PM, Trevor Donaldson <[email protected]>
>> wrote:
>>
>> > I would like to request the ability to add Http Headers as a future
>> > enhancement request.
>> >
>> > On Tue, Jan 27, 2015 at 4:26 AM, Arthur Vaïsse-Lesteven <
>> > [email protected]> wrote:
>> >
>> > > I all,
>> > > If I would like to mention that I did a similar request some time
>> ago.Not
>> > > exactly the same but I opened a Jira at the moment:
>> > > https://issues.apache.org/jira/browse/JENA-541
>> > > I suppose that the fix I used is no longer appropriate, but it worked
>> for
>> > > the concerned version.You may adapt it to the current version.
>> > > Arthur Vaïsse-Lesteven.
>> > >
>> > > I would like to add some Http Headers to the request that is made by
>> > > QueryExecutionFactory.sparqlService. Is this possible? Thanks
>> > >
>> > >
>> > >
>> > >
>> >
>>
>>
>>
>> --
>> I like: Like Like - The likeliest place on the web
>> <http://like-like.xenei.com>
>> LinkedIn: http://www.linkedin.com/in/claudewarren
>>
>
>