aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/http.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/http.js')
-rw-r--r--src/ng/http.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ng/http.js b/src/ng/http.js
index aa8c4071..011b33a8 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -202,7 +202,7 @@ function $HttpProvider() {
* that is used to generate an HTTP request and returns a {@link ng.$q promise}
* with two $http specific methods: `success` and `error`.
*
- * <pre>
+ * ```js
* $http({method: 'GET', url: '/someUrl'}).
* success(function(data, status, headers, config) {
* // this callback will be called asynchronously
@@ -212,7 +212,7 @@ function $HttpProvider() {
* // called asynchronously if an error occurs
* // or server returns response with an error status.
* });
- * </pre>
+ * ```
*
* Since the returned value of calling the $http function is a `promise`, you can also use
* the `then` method to register callbacks, and these callbacks will receive a single argument –
@@ -241,10 +241,10 @@ function $HttpProvider() {
* POST/PUT requests require request data to be provided as well, shortcut methods
* were created:
*
- * <pre>
+ * ```js
* $http.get('/someUrl').success(successCallback);
* $http.post('/someUrl', data).success(successCallback);
- * </pre>
+ * ```
*
* Complete list of shortcut methods:
*
@@ -369,7 +369,7 @@ function $HttpProvider() {
* resolved with a rejection.
*
*
- * <pre>
+ * ```js
* // register the interceptor as a service
* $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
* return {
@@ -422,7 +422,7 @@ function $HttpProvider() {
* }
* };
* });
- * </pre>
+ * ```
*
* # Response interceptors (DEPRECATED)
*
@@ -440,7 +440,7 @@ function $HttpProvider() {
* injected with dependencies (if specified) and returns the interceptor — a function that
* takes a {@link ng.$q promise} and returns the original or a new promise.
*
- * <pre>
+ * ```js
* // register the interceptor as a service
* $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
* return function(promise) {
@@ -466,7 +466,7 @@ function $HttpProvider() {
* // same as above
* }
* });
- * </pre>
+ * ```
*
*
* # Security Considerations
@@ -490,15 +490,15 @@ function $HttpProvider() {
* Angular will automatically strip the prefix before processing it as JSON.
*
* For example if your server needs to return:
- * <pre>
+ * ```js
* ['one','two']
- * </pre>
+ * ```
*
* which is vulnerable to attack, your server can return:
- * <pre>
+ * ```js
* )]}',
* ['one','two']
- * </pre>
+ * ```
*
* Angular will strip the prefix, before processing the JSON.
*