@@ -1417,12 +1417,14 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
1417
1417
* order to change how a matched request is handled.
1418
1418
*
1419
1419
* - respond –
1420
- * `{function([status,] data[, headers, statusText])
1421
- * | function(function(method, url, data, headers, params)}`
1420
+ * ```js
1421
+ * {function([status,] data[, headers, statusText])
1422
+ * | function(function(method, url, data, headers, params)}
1423
+ * ```
1422
1424
* – The respond method takes a set of static data to be returned or a function that can
1423
- * return an array containing response status (number), response data (string), response
1424
- * headers (Object), and the text for the status (string). The respond method returns the
1425
- * `requestHandler` object for possible overrides.
1425
+ * return an array containing response status (number), response data (Array|Object| string),
1426
+ * response headers (Object), and the text for the status (string). The respond method returns
1427
+ * the `requestHandler` object for possible overrides.
1426
1428
*/
1427
1429
$httpBackend . when = function ( method , url , data , headers , keys ) {
1428
1430
var definition = new MockHttpExpectation ( method , url , data , headers , keys ) ,
@@ -1607,12 +1609,14 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
1607
1609
* order to change how a matched request is handled.
1608
1610
*
1609
1611
* - respond –
1610
- * `{function([status,] data[, headers, statusText])
1611
- * | function(function(method, url, data, headers, params)}`
1612
+ * ```
1613
+ * { function([status,] data[, headers, statusText])
1614
+ * | function(function(method, url, data, headers, params)}
1615
+ * ```
1612
1616
* – The respond method takes a set of static data to be returned or a function that can
1613
- * return an array containing response status (number), response data (string), response
1614
- * headers (Object), and the text for the status (string). The respond method returns the
1615
- * `requestHandler` object for possible overrides.
1617
+ * return an array containing response status (number), response data (Array|Object| string),
1618
+ * response headers (Object), and the text for the status (string). The respond method returns
1619
+ * the `requestHandler` object for possible overrides.
1616
1620
*/
1617
1621
$httpBackend . expect = function ( method , url , data , headers , keys ) {
1618
1622
var expectation = new MockHttpExpectation ( method , url , data , headers , keys ) ,
@@ -2327,11 +2331,13 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
2327
2331
* `respond` or `passThrough` again in order to change how a matched request is handled.
2328
2332
*
2329
2333
* - respond –
2330
- * `{function([status,] data[, headers, statusText])
2331
- * | function(function(method, url, data, headers, params)}`
2334
+ * ```
2335
+ * { function([status,] data[, headers, statusText])
2336
+ * | function(function(method, url, data, headers, params)}
2337
+ * ```
2332
2338
* – The respond method takes a set of static data to be returned or a function that can return
2333
- * an array containing response status (number), response data (string), response headers
2334
- * (Object), and the text for the status (string).
2339
+ * an array containing response status (number), response data (Array|Object| string), response
2340
+ * headers (Object), and the text for the status (string).
2335
2341
* - passThrough – `{function()}` – Any request matching a backend definition with
2336
2342
* `passThrough` handler will be passed through to the real backend (an XHR request will be made
2337
2343
* to the server.)
0 commit comments