setData(byte[]) method

Sets the request data in case of an HTTP POST request.

Syntax

public void setData ( byte[] data )

Parameters

Returns

None

Example 1

BaseRequest getrequest = new BaseRequest(); String postBody= "<atom:entry xmlns:atom=\"http://www.w3.org/2005/Atom">" + "<atom:content type="application/xml">" + "<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" *xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">" + "<d:agencynum>09964571</d:agencynum>" + "<d:NAME ></d:NAME>" + "<d:STREET />" + "<d:POSTBOX />" + * "<d:POSTCODE />" + "<d:CITY />" + "<d:COUNTRY />" + "<d:REGION />" + "<d:TELEPHONE>+9945007007</d:TELEPHONE>" + "<d:URL />" + "<d:LANGU />" + "<d:CURRENCY />" + "<d:mimeType>text/html</d:mimeType>" + "</m:properties>" + "</atom:content>" + "</atom:entry>"; post1.setData(postBody.getBytes());