Adding Custom Headers

Add custom headers to a request message. This is a name/value pair that defines the operating parameters of an HTTP transaction. Custom headers are optional while sending a data request to the back-end.

The following code illustrates how to add custom headers.
Hashtable headers = new Hashtable();
headers.put("X-Requested-With", "XMLHttpRequest");
serviceDocumentRequest.setHeaders(headers);