Skip to content

Commit e07ebde

Browse files
committed
docs($http): use .get and .post shortcut methods in examples
1 parent 1f650ba commit e07ebde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/http.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function $HttpProvider() {
231231
*
232232
* ```js
233233
* // Simple GET request example :
234-
* $http({method: 'GET', url: '/someUrl'}).
234+
* $http.get('/someUrl').
235235
* success(function(data, status, headers, config) {
236236
* // this callback will be called asynchronously
237237
* // when the response is available
@@ -244,7 +244,7 @@ function $HttpProvider() {
244244
*
245245
* ```js
246246
* // Simple POST request example (passing data) :
247-
* $http({method: 'POST', url: '/someUrl', data:{msg:'hello word!'}}).
247+
* $http.post('/someUrl', {msg:'hello word!'}).
248248
* success(function(data, status, headers, config) {
249249
* // this callback will be called asynchronously
250250
* // when the response is available

0 commit comments

Comments
 (0)