If the header is going to change on every request, setting default headers may not be flexible enough-- the OP would have to change clients for every query.
Can you tell us more about your use case? Are the custom headers for some one particular purpose? In a released version, you may have to use your own HTTP client and just let Jena build the request bodies and parse the response bodies. We can look at adding this to the API in a future release, but I'd like to hear more about the use case first. ajs6f > On Sep 9, 2018, at 12:20 PM, Andy Seaborne <[email protected]> wrote: > > > > On 08/09/18 21:00, Niraj Patel wrote: >> Hi! >> I am using Jena's QueryEngineHTTP for queries and RemoteUpdateRequest for >> updates. I would like to send a custom header that will differ on each >> request. I did some digging around and it seems like it’s not possible. >> Using default headers when configuring Apache’s Http Client wouldn’t work in >> this case. Any ideas? >> Niraj Patel > > Hi there, > > either create a QueryEngineHTTP directly passing in the required HttpClient > specially created with setDefaultHeaders(headers) > > Also, have a look at the builder for RDFConnections that are remote: > RDFConnectionRemote.create(RDFConnectionRemote) > > What's the use case for the custom header? I'm wondering if it is a usual or > unusual situation. > > Andy
