0.3.0 • Published 1 year ago
@tryghost/signed-request v0.3.0
Signed Request
Install
npm install @tryghost/signed-request --save
or
yarn add @tryghost/signed-request
Usage
Provides a signed GET request
Needs the following minimum arguments: Arg 1: hmac_key used to sign the request Arg 2: server address or ip to send request to (protocol is stripped) Arg 3: additional path of request or empty string e.g: /packages Optional Arg 4: options object with properties:
- source - where your request originated from
- protocol - to overwrite default request protocol of http://
Example usage:
const signedRequest = require('@tryghost/signed-request');
signedRequest.exec(hmac, server, path, options)Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
1. git clone this repo & cd into it as usual
2. Run yarn to install top-level dependencies.
Run
yarn dev
Test
yarn lintrun just eslintyarn testrun lint and tests
Copyright & License
Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.