From ca46e6215672053b715598ae4a0751c0df05bd6c Mon Sep 17 00:00:00 2001 From: Hugo Freitas Date: Tue, 31 Jan 2017 15:05:15 -0300 Subject: [PATCH] docs: useCredentials -> withCredentials (#1575) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 353976cf..742e18a1 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Basically, XHR is just a way to talk to a server. Let's change our click counter to make it save data on a server. For the server, we'll use [REM](http://rem-rest-api.herokuapp.com), a mock REST API designed for toy apps like this tutorial. -First we create a function that calls `m.request`. The `url` specifies an endpoint that represents a resource, the `method` specifies the type of action we're taking (typically the `PUT` method [upserts](https://en.wiktionary.org/wiki/upsert)), `data` is the payload that we're sending to the endpoint and `useCredentials` means to enable cookies (a requirement for the REM API to work) +First we create a function that calls `m.request`. The `url` specifies an endpoint that represents a resource, the `method` specifies the type of action we're taking (typically the `PUT` method [upserts](https://en.wiktionary.org/wiki/upsert)), `data` is the payload that we're sending to the endpoint and `withCredentials` means to enable cookies (a requirement for the REM API to work) ```javascript var count = 0 @@ -232,7 +232,7 @@ var increment = function() { method: "PUT", url: "http://rem-rest-api.herokuapp.com/api/tutorial/1", data: {count: count + 1}, - useCredentials: true, + withCredentials: true, }) .then(function(data) { count = parseInt(data.count)