[go: up one dir, main page]

[][src]Function surf::post

Important traits for Request<C>
pub fn post(uri: impl AsRef<str>) -> Request<NativeClient>

Perform a one-off POST request.

About the HTTP Method

The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.

The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical POST may have additional effects, like passing an order several times.

A POST request is typically sent via an HTML form and results in a change on the server. In this case, the content type is selected by putting the adequate string in the enctype attribute of the

element or the formenctype attribute of the or