
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@zuplo/httpsnippet
Advanced tools
HTTP Request snippet generator for many languages & tools including:
cURL,HTTPie,Javascript,Node,C,Java,PHP,Objective-C,Swift,Python,Ruby,C#,Go,OCamland more!
Relies on the popular HAR format to import data and describe HTTP calls.
See it in action on ReadMe.
npm install --save @readme/httpsnippet
Required Type: object
The HAR request object to generate a snippet for.
import { HTTPSnippet } from '@readme/httpsnippet';
const snippet = new HTTPSnippet({
method: 'GET',
url: 'https://httpbin.org/anything',
});
Type: object
Available options:
harIsAlreadyEncoded (boolean): In the event of you supplying a source HAR that already contains escaped data (query and cookie parameters)strings, this allows you to disable automatic encoding of those parameters to prevent them from being double-escaped.Required Type: string
Name of conversion target
Type: object
Target options, see wiki for details
import { HTTPSnippet } from '@readme/httpsnippet';
const snippet = new HTTPSnippet({
method: 'GET',
url: 'https://httpbin.org/anything',
});
// generate Node.js: Native output
console.log(snippet.convert('node'));
// generate Node.js: Native output, indent with tabs
console.log(
snippet.convert('node', {
indent: '\t',
}),
);
Required Type: string
Name of conversion target
Type: string
Name of conversion target client library
Type: object
Target options, see wiki for details
import { HTTPSnippet } from '@readme/httpsnippet';
const snippet = new HTTPSnippet({
method: 'GET',
url: 'https://httpbin.org/anything',
});
// generate Shell: cURL output
console.log(
snippet.convert('shell', 'curl', {
indent: '\t',
}),
);
// generate Node.js: Unirest output
console.log(snippet.convert('node', 'unirest'));
Required Type: object
Representation of a conversion target. Can use this to use targets that are not officially supported.
import { customLanguageTarget } from 'httpsnippet-for-my-lang';
HTTPSnippet.addTarget(customLanguageTarget);
Required Type: string
Name of conversion target
Required Type: object
Representation of a conversion target client. Can use this to use target clients that are not officially supported.
import { customClient } from 'httpsnippet-for-my-node-http-client';
HTTPSnippet.addTargetClient('node', customClient);
Required Type: object
The client plugin to install.
addClientPlugin({
target: 'node',
client: {
info: {
key: 'custom',
title: 'Custom HTTP library',
link: 'https://example.com',
description: 'A custom HTTP library',
extname: '.custom',
},
convert: () => {
return 'This was generated from a custom client.';
},
},
});
The above example will create a new custom client snippet generator for the node target.
At the heart of this module is the HAR Format as the HTTP request description format, please review some of the sample JSON HAR Request objects in test fixtures, or read the HAR Docs for more details.
For detailed information on each target, please review the wiki.
kong/httpsnippetThere are some major differences between this library and the httpsnippet upstream:
HTTPSnippet export contains an options argument for an harIsAlreadyEncoded option for disabling escaping of cookies and query strings in URLs.
insecureSkipVerify option on go:native, node:native, ruby:native, and shell:curl as we don't want snippets generated for our users to bypass SSL certificate verification.#addClientPlugin, for quick installation of a target client.fetch
JSON.stringify(). We do this to keep those targets looking nicer with those kinds of payloads. This also applies to the JS fetch target as well.request
params argument due to complexities with query encoding.guzzle
require_once('vendor/autoload.php'); prefixed at the top.python3
requests
params argument due to complexities with query encoding.FAQs
HTTP Request snippet generator for *most* languages
We found that @zuplo/httpsnippet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.