Hi,

I have create an integration test to read the service document and recognized 
that client sends an default accept header which is 
"application/json;odata.metadata=full". The server currently supports only 
minimal and doesn't accept the request.



  @Test

  public void readServiceDocument() {

    ODataServiceDocumentRequest request =

        
odata.getRetrieveRequestFactory().getServiceDocumentRequest(REF_SERVICE);

    assertNotNull(request);

    ODataServiceDocument serviceDocument = request.execute().getBody();

    assertNotNull(serviceDocument);

  }


Is it by purpose to add an accept header if client code doesn't set a header 
explicitly? If this is the case then I must overwrite the header by this


    request.setAccept("application/json;odata.metadata=minimal");

to get the request accepted.

Regards,
Stephan

Reply via email to