update to 4.0

This commit is contained in:
Otto Mao
2017-12-01 21:30:49 +08:00
parent e392fefc64
commit 4be5aa8954
267 changed files with 27008 additions and 84482 deletions

View File

@@ -0,0 +1,19 @@
//rule scheme :
module.exports = {
*summary() {
return 'Rule to intercept https request';
},
*beforeSendResponse(requestDetail, responseDetail) {
const newResponse = responseDetail.response;
newResponse.body = newResponse.body.toString() + '_hello_world';
return {
response: newResponse
};
},
*beforeDealHttpsRequest(requestDetail) {
return requestDetail.host.indexOf('localhost:3001') > -1;
}
};