Rx.DOM.Request.post(url, [body])

# [Ⓣ][1]

Creates an observable sequence from an Ajax POST Request with the body. This method is just shorthand for the Rx.DOM.Request.ajax method with the POST method.

Syntax

Rx.DOM.Request.post(url, body);

Arguments

  1. url (String): A string of the URL to make the Ajax call.
  2. [body] (Object): The body to post

Returns

(Observable): The observable sequence which contains the response from the Ajax POST.

Example

Rx.DOM.Request.post('/test')
    .subscribe(
        function (xhr) {
            console.log(xhr.responseText);
        },
        function (err) {
            // Log the error
        }
    );