0.5.19 • Published 2 years ago

whistle.easy-mock v0.5.19

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

whistle.easy-mock

A simple mock plugin with ui for whistle

Usage

Install whistle

npm i -g whistle

Install plugin

npm i -g whistle.easy-mock
# or
w2 install whistle.easy-mock

Proxy your website

Use tools like SwitchyOmega to proxy your website to whistle

Add rule in whistle's Rules tab

Accept two parameters, separated by '|':

  1. (optional) collection_id: select which collection to take effect
  2. (optional) host: replace the host of the matched request
[pattern] easy-mock://[collection_id]|[host]

# if you only want to replace host, still need the '|' separator
[pattern] easy-mock://|host

# for example
www.google.com easy-mock://demo

Open whistle.easy-mock plugin to start mock (two ways)

  1. direct open under whistle's plugin panel npm.io
  2. visit http://localhost:8899/whistle.easy-mock and save as PWA app
    (replace the 8899 port with your own whistle's real listening port) npm.io

Feature

Use collections to manage your mock data

npm.io

Mock data by matching in order of preference:

  1. The value for service_method key in the Query / Request Body npm.io
  2. URL pathname npm.io

Customized JSON5 editor, with comment & javascript object syntax support

Support switching mock data for one request

npm.io

Support Mock.js syntax

npm.io

Support encoding/decoding data with JSON.stringify/JSON.parse by adding special prefix $$/$$$

npm.io npm.io

Support setting response delay (0 - 15s)

npm.io (Special usage: set delay to > 0 and leave the mock data as an empty object "{}" will delay the real response without replacing the real data)

One-click to cache all JSON response

0.5.10

2 years ago

0.5.11

2 years ago

0.5.18

2 years ago

0.5.19

2 years ago

0.5.16

2 years ago

0.5.17

2 years ago

0.5.14

2 years ago

0.5.15

2 years ago

0.5.12

2 years ago

0.5.13

2 years ago

0.5.6

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.5

2 years ago

0.5.2

2 years ago

0.3.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago