@@ -1088,7 +1088,9 @@ function createHttpBackendMock($delegate, $browser) {
1088
1088
*
1089
1089
* @param {string } method HTTP method.
1090
1090
* @param {string|RegExp } url HTTP url.
1091
- * @param {(string|RegExp)= } data HTTP request body.
1091
+ * @param {(string|RegExp|function(string)|Object)= } data HTTP request body or function that
1092
+ * receives data string and returns true if the data is as expected, or Object if request body
1093
+ * is in JSON format.
1092
1094
* @param {(Object|function(Object))= } headers HTTP headers or function that receives http header
1093
1095
* object and returns true if the headers match the current expectation.
1094
1096
* @returns {requestHandler } Returns an object with `respond` method that control how a matched
@@ -1157,7 +1159,9 @@ function createHttpBackendMock($delegate, $browser) {
1157
1159
* Creates a new request expectation for POST requests. For more info see `expect()`.
1158
1160
*
1159
1161
* @param {string|RegExp } url HTTP url.
1160
- * @param {(string|RegExp)= } data HTTP request body.
1162
+ * @param {(string|RegExp|function(string)|Object)= } data HTTP request body or function that
1163
+ * receives data string and returns true if the data is as expected, or Object if request body
1164
+ * is in JSON format.
1161
1165
* @param {Object= } headers HTTP headers.
1162
1166
* @returns {requestHandler } Returns an object with `respond` method that control how a matched
1163
1167
* request is handled.
@@ -1171,7 +1175,9 @@ function createHttpBackendMock($delegate, $browser) {
1171
1175
* Creates a new request expectation for PUT requests. For more info see `expect()`.
1172
1176
*
1173
1177
* @param {string|RegExp } url HTTP url.
1174
- * @param {(string|RegExp)= } data HTTP request body.
1178
+ * @param {(string|RegExp|function(string)|Object)= } data HTTP request body or function that
1179
+ * receives data string and returns true if the data is as expected, or Object if request body
1180
+ * is in JSON format.
1175
1181
* @param {Object= } headers HTTP headers.
1176
1182
* @returns {requestHandler } Returns an object with `respond` method that control how a matched
1177
1183
* request is handled.
@@ -1185,7 +1191,9 @@ function createHttpBackendMock($delegate, $browser) {
1185
1191
* Creates a new request expectation for PATCH requests. For more info see `expect()`.
1186
1192
*
1187
1193
* @param {string|RegExp } url HTTP url.
1188
- * @param {(string|RegExp)= } data HTTP request body.
1194
+ * @param {(string|RegExp|function(string)|Object)= } data HTTP request body or function that
1195
+ * receives data string and returns true if the data is as expected, or Object if request body
1196
+ * is in JSON format.
1189
1197
* @param {Object= } headers HTTP headers.
1190
1198
* @returns {requestHandler } Returns an object with `respond` method that control how a matched
1191
1199
* request is handled.
0 commit comments