@tryghost/signed-request
v0.3.0
Published
## Install
Downloads
1,542
Maintainers
Keywords
Readme
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.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.