Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: SMP 3.0 sp03 Android Native: How to post(Create) table of records

$
0
0

Hi Rodrigo,

 

Batch requests allow you to group multiple Odata requests into single HTTP request.

GET, POST, PUT, DELETE requests can be added to a batch request. You have to manage it from the device code.

 

Ex.

 

private static final String ODATA_BATCH_VERB = "$batch";

...

//Create the Batch Request

BatchRequest mBatchRequest = new BatchRequest(appEndPoint + ODATA_BATCH_VERB);

mBatchRequest.setListener(this);

mBatchRequest.setPriority(IRequest.PRIORITY_HIGH);

 

//Create the Batch Request

mBatchRequest.addRetrieveRequestToBatch(getRequest);

mBatchRequest.addRequestToChangeset(deleteRequest);

mBatchRequest.addRequestToChangeset(createRequest);

mBatchRequest.addRequestToChangeset(updateRequest);

 

//Close change Requests

mBatchRequest.closeExistingChangeSet();

 

//Execute the batch request

requestManager().makeRequest(mBatchRequest);

 

Regards,

Midhun VP


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>