
Product
Unify Your Security Stack with Socket Basics
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
@pfapi/tester
Advanced tools
a command line tester for strapi-plugin pfapi
npm install @pfapi/tester -g
> pfapi-tester -h
Usage: pfapi-tester [OPTIONS]...
cli to test strapi plugin pfapi
Options:
-V, --version output the version number
-b, --base_url <url> base url (default: "http://localhost:1337")
-p, --path <path> url path & query string (default: "/pfapi/northern-cities")
-k, --api_key <key> pfapi api key (default: "Pfapi-Demo")
-c, --concurrent run concurrently
-f, --fetch_items fetch each item if there items in response
-w, --walk_through walk through all pages
-t, --times <3> run how many times (default: "3")
-d, --delay <ms> simulate delay within api
-g, --etag send if-none-match with etag
-e, --expires send if-modified-since with expires
-s, --sleep <ms> sleep for ms after each request
-r, --ss_rand disable server caches on each request
-l, --legend print legend of stats
-v, --verbose print verbose details
-h, --help display help for command
> pfapi-tester -p /pfapi/pf/northern-cities -t 10 -l
++++++++++
{
base_url: '...',
path: '/pfapi/pf/northern-cities',
times: 10,
legend: true
}
total: 10 ok: 10 not_ok: 0
------------------------------
pfapi http total
------------------------------
ave 1.96 3.01 132.06
min 0.85 1.68 98.85
max 10.56 11.54 176.20
------------------------------
all values are in milliseconds.
pfapi: time used by pfapi.
http: time used by http server.
total: round-trip delay + http.
p_response_time: pfapi response time in ms.
x_response_time: strapi response time in ms.
total_time: total time used for the http request in ms.
setup .env in you work directory can save put into option -b and -k, on each run.
BASE_URL=http://localhost:1337
API_KEY=Pfapi-Demo-XXXXXX
setup strapi to send x-response-time in the response headers:
yarn add koa-response-time
add following code in file src/index.js
...
const responseTime = require('koa-response-time');
module.exports = {
...
bootstrap({ strapi }) {
strapi.server.app.use(responseTime({ hrtime: true }));
},
};
FAQs
a command line tester for strapi-plugin pfapi
The npm package @pfapi/tester receives a total of 6 weekly downloads. As such, @pfapi/tester popularity was classified as not popular.
We found that @pfapi/tester demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.
Research
/Security News
The Socket Threat Research Team uncovered a coordinated campaign that floods the Chrome Web Store with 131 rebranded clones of a WhatsApp Web automation extension to spam Brazilian users.