Ramesh Reddy created OLINGO-705:
-----------------------------------
Summary: EdmMetadataRequest ignores the Custom Headers set
Key: OLINGO-705
URL: https://issues.apache.org/jira/browse/OLINGO-705
Project: Olingo
Issue Type: Bug
Components: odata4-client
Affects Versions: (Java) V4 4.0.0-beta-03
Reporter: Ramesh Reddy
Priority: Critical
I am trying to add "Authorization" header for retrieving $metadata on the
service that is secured though HTTPBasic. The following code fails with 401.
{code}
EdmMetadataRequest metadataRequest =
client.getRetrieveRequestFactory().getMetadataRequest(serviceRoot);
metadataRequest.addCustomHeader("Authorization", "Basic dXNlcjpyZWRoYXQxIQ==");
ODataRetrieveResponse<Edm> metadataRespose = metadataRequest.execute();
Edm edm = metadataRespose.getBody();
{code}
While debugging through the code, I found out that the header is never set on
the request object. The same worked on the "ODataEntitySetIteratorRequest", but
I suggest verify this on all the requests.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)