@appknit-project/appknit-internal-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.94-0 • Public • Published

Appknit platform SDK

Library for injecting in together with client code in Execution MS

NPM package here.

Usage

Client's code

const options = {
    url: "https://en4tapktc2xtb.x.pipedream.net/test/vm",
    method: "post",
    headers: { "Content-Type": "application/json;charset=utf-8" },
    data: {x: 123, y: "smth"}
};

const res1 = await sdk.axios(options); 
const res2 = await sdk.axios(options); 
const res3 = await sdk.axios(options); 

output = [].push(res1.data, res2.data, res3.data);

ExecutionMS response

[
  {
    request_type: 'outgoing_http_request',
    request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
    request_method: 'post',
    request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
    request_data: {x: 123, y: "smth"},
    response_status_code: 200,
    response_status_text: 'OK',
    response_headers: {
      'access-control-allow-origin': '*',
      'content-type': 'application/json; charset=utf-8',
      date: 'Fri, 03 Jul 2020 16:37:20 GMT',
      'x-pd-status': 'sent to primary',
      'x-powered-by': 'Express',
      'content-length': '16',
      connection: 'Close'
    },
    response_body: { success: true }
  },
  {
    request_type: 'outgoing_http_request',
    request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
    request_method: 'post',
    request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
    request_data: {x: 123, y: "smth"},
    response_status_code: 200,
    response_status_text: 'OK',
    response_headers: {
      'access-control-allow-origin': '*',
      'content-type': 'application/json; charset=utf-8',
      date: 'Fri, 03 Jul 2020 16:37:21 GMT',
      'x-pd-status': 'sent to primary',
      'x-powered-by': 'Express',
      'content-length': '16',
      connection: 'Close'
    },
    response_body: { success: true }
  },
  {
    request_type: 'outgoing_http_request',
    request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
    request_method: 'post',
    request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
    request_data: {x: 123, y: "smth"},
    response_status_code: 200,
    response_status_text: 'OK',
    response_headers: {
      'access-control-allow-origin': '*',
      'content-type': 'application/json; charset=utf-8',
      date: 'Fri, 03 Jul 2020 16:37:21 GMT',
      'x-pd-status': 'sent to primary',
      'x-powered-by': 'Express',
      'content-length': '16',
      connection: 'Close'
    },
    response_body: { success: true }
  }
]

Readme

Keywords

none

Package Sidebar

Install

npm i @appknit-project/appknit-internal-sdk

Homepage

appknit.io

Weekly Downloads

111

Version

1.0.94-0

License

MIT

Unpacked Size

12.1 kB

Total Files

8

Last publish

Collaborators

  • salmanvamiq.appknit
  • rpanchagnula