Post Method For Restful Apis

Can anyone demonstrate how a POST method would be used to send information to a RESTful Web Service API?

I already have the service working, for example:


http://api.myapp/endpoint

In my application I have a form, once submitted how do I send


Yii::$app->request->post()

to the service?

http://api.jquery.com/jQuery.ajax/

I actually want to implement this in the controller and possibly manipulate the post data before sending to the web service.

Yii has REST API framework that is to create APIs, not use other APIs. As for calling other APIs, check CURL or something more sophisticated such as https://github.com/guzzle/guzzle

I can do this with curl, I just thought there might have been somthing in the framework I missed. Thanks