1.0.19 • Published 2 years ago

@firecamp/rest-executor v1.0.19

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

REST-executor

Pre-requisite

  • Node.js v16
  • Pre-script request only contains specific keys, so need to merge with actual one before send to the executor
  • Post-script response only contains specific keys, so need to merge with actual one before going to use

TODO

  • Test cases
    • add graphql body test case
    • chrome agent test cases not running due to chrome API not found
    • Unable to use File, FormData API which prevent run form data body with File

Build

  • Run: pnpm build

Run test case

  • Run: pnpm test

Usage

Execute REST request

// React App
import executor from '@firecamp/rest-executor/dist/esm';

// Node.js
import executor from '@firecamp/rest-executor/dist/cjs';

// Run pre script
const { request, environment } = await executor.preScript(request, variables);

// Run request
const response = await executor.send(request);

// Set cookies

// Run post script
await executor.postScript(postScript: string, response: IRestResponse, variables: TPlainObject);

// Run test script
await executor.testScript(request: IRest, response: IRestResponse, variables: TPlainObject);
1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago