private void doWireLogging(ODataRequest request) throws UnsupportedEncodingException { if (LOG.isTraceEnabled()) { LOG.trace("RAW REQUEST LOGGING"); LOG.trace("{} request for URL: {}", request.getMethod().name(), request.getUri()); for (Map.Entry<String, String> headerEntry : request.getHeaders().entrySet()) { LOG.trace("Header: {} value: {}", headerEntry.getKey(), headerEntry.getValue()); } LOG.trace("BODY: {}", request.getBodyText(UTF_8.name())); } } }
private void doWireLogging(ODataRequest request) throws UnsupportedEncodingException { if (LOG.isTraceEnabled()) { LOG.trace("RAW REQUEST LOGGING"); LOG.trace("{} request for URL: {}", request.getMethod().name(), request.getUri()); for (Map.Entry<String, String> headerEntry : request.getHeaders().entrySet()) { LOG.trace("Header: {} value: {}", headerEntry.getKey(), headerEntry.getValue()); } LOG.trace("BODY: {}", request.getBodyText(UTF_8.name())); } } }
@Override public String doPostEntity(Map<String, String> requestProperties, URL url, String body, MediaType contentType, MediaType acceptType) throws ODataClientException { return sendRequest(getRequestHeaders(requestProperties, body.length(), contentType, acceptType), url, body, ODataRequest.Method.POST.name()); }
@Override public String doPutEntity(Map<String, String> requestProperties, URL url, String body, MediaType type) throws ODataClientException { return sendRequest(getRequestHeaders(requestProperties, body.length(), type, type), url, body, ODataRequest.Method.PUT.name()); }
@Override public void doDeleteEntity(Map<String, String> requestProperties, URL urlToCall) throws ODataClientException { sendRequest(populateRequestProperties(requestProperties, 0, ATOM_XML, ATOM_XML), urlToCall, "", ODataRequest.Method.DELETE.name()); }
@Override public String doPutEntity(Map<String, String> requestProperties, URL urlToCall, String body, MediaType type) throws ODataClientException { return sendRequest(populateRequestProperties(requestProperties, body.length(), type, type), urlToCall, body, ODataRequest.Method.PUT.name()); }
@Override public void doDeleteEntity(Map<String, String> requestProperties, URL url) throws ODataClientException { sendRequest(getRequestHeaders(requestProperties, 0, ATOM_XML, ATOM_XML), url, "", ODataRequest.Method.DELETE.name()); }
@Override public String doPostEntity(Map<String, String> requestProperties, URL urlToCall, String body, MediaType contentType, MediaType acceptType) throws ODataClientException { return sendRequest(populateRequestProperties(requestProperties, body.length(), contentType, acceptType), urlToCall, body, ODataRequest.Method.POST.name()); }