Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 680 Bytes

rest.post.md

File metadata and controls

24 lines (18 loc) · 680 Bytes

rest.post

The post function calls a REST API using the POST method. It returns a JSON object.

Sample

var params={"nm":"customer name 1"};
var ret = rest.post("http://localhost:8080/restSample/efwRestAPI/customer/u001",params);
// {"id":"u001","nm":"customer name 1"}

API

Calling Returning
rest. post ( apiUrl, params ) null or JSON
rest. post ( apiUrl, params, heads ) null or JSON
Parameters Type Description
apiUrl String The URL for the REST API.
params JSON Object The data to send to the REST API.
heads JSON Object Additional request headers.