aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/xhr.js
diff options
context:
space:
mode:
authorVojta Jina2011-08-10 15:59:55 +0200
committerIgor Minar2011-11-30 11:03:41 -0500
commit45f47ff6cd264dcd347e6df92c9ef39b0ae8aaba (patch)
tree3b18d13dca703ee7ce21f11729ff3db31a55cfb9 /src/service/xhr.js
parent0c8b35681e2ea9ce3ee6a188476f89be1336f1cb (diff)
downloadangular.js-45f47ff6cd264dcd347e6df92c9ef39b0ae8aaba.tar.bz2
fix($browser.xhr): change method "JSON" to "JSONP"
Breaks "JSON" xhr method is now called "JSONP"
Diffstat (limited to 'src/service/xhr.js')
-rw-r--r--src/service/xhr.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/service/xhr.js b/src/service/xhr.js
index d9c78fd6..7970622b 100644
--- a/src/service/xhr.js
+++ b/src/service/xhr.js
@@ -85,7 +85,7 @@
* {@link http://en.wikipedia.org/wiki/Rainbow_table salt for added security}.
*
* @param {string} method HTTP method to use. Valid values are: `GET`, `POST`, `PUT`, `DELETE`, and
- * `JSON`. `JSON` is a special case which causes a
+ * `JSONP`. `JSONP` is a special case which causes a
* [JSONP](http://en.wikipedia.org/wiki/JSON#JSONP) cross domain request using script tag
* insertion.
* @param {string} url Relative or absolute URL specifying the destination of the request. For
@@ -135,13 +135,13 @@
<div ng:controller="FetchCntl">
<select ng:model="method">
<option>GET</option>
- <option>JSON</option>
+ <option>JSONP</option>
</select>
<input type="text" ng:model="url" size="80"/>
<button ng:click="fetch()">fetch</button><br>
<button ng:click="updateModel('GET', 'index.html')">Sample GET</button>
- <button ng:click="updateModel('JSON', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button>
- <button ng:click="updateModel('JSON', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button>
+ <button ng:click="updateModel('JSONP', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button>
+ <button ng:click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button>
<pre>code={{code}}</pre>
<pre>response={{response}}</pre>
</div>