Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 874 Bytes

rest.post.md

File metadata and controls

27 lines (21 loc) · 874 Bytes

rest.post

The post function is established to call a restAPI with post method. Its return is 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

CallingReturning
rest . post ( apiUrl , params )null or JSON
rest . post ( apiUrl , params , heads )null or JSON
ParametersTypeDescription
apiUrlStringThe url for the called rest api.
paramsJSON ObjectTo send values to the rest api.
headsJSON ObjectThe additional request heads.