2.0.3 • Published 2 years ago

mocker-api-faster v2.0.3

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

Usage

  1. Clone the Example project
  2. install the dependencies yarn or npm install
  3. Make the requests and see the results

cURL

List Mocks

curl --request GET \
  --url http://localhost:8000/mocks

List all - 1s Delay - Base fixture

curl --request GET \
  --url http://localhost:8000/users \
  --header 'expected-delay: 1000' \
  --header 'expected-fixture-type: base' \
  --header 'expected-status-code: 200'

Find - 1s Delay - Base fixture

  curl --request GET \
  --url http://localhost:8000/users/123 \
  --header 'expected-delay: 1000' \
  --header 'expected-fixture-type: base' \
  --header 'expected-status-code: 200'

Create - Success - 1s Delay - Base Fixture

  curl --request POST \
    --url http://localhost:8000/users \
    --header 'Content-Type: application/json' \
    --header 'expected-delay: 1000' \
    --header 'expected-fixture-type: base' \
    --header 'expected-status-code: 201' \
    --data '{}'

Create - Conflict - 1s Delay - Conflict Fixture

  curl --request POST \
    --url http://localhost:8000/users \
    --header 'Content-Type: application/json' \
    --header 'expected-delay: 1000' \
    --header 'expected-fixture-type: conflict' \
    --header 'expected-status-code: 400' \
    --data '{}'

Create - Bad Request - 1s Delay - Base Fixture

  curl --request POST \
   --url http://localhost:8000/users \
   --header 'Content-Type: application/json' \
   --header 'expected-delay: 1000' \
   --header 'expected-fixture-type: base' \
   --header 'expected-status-code: 400' \
   --data '{}'
2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago