requestcodegen
is a library to generate HTTP client example code in different programming languages.
npm install requestcodegen --save
Using the library is as easy as:
import { generateCode } from "requestcodegen";
const clojureCodeExample = generateCode(
{ url: "http://example.com/", method: "POST" },
CodeTarget.Clojure
);
To build and publish the library:
- Bump the version property in the
package.json
file. - Run
npm run prepare
. - Run
npm publish
.
Check out examples of generated code in the examples.md file.
A few examples of how the library is used:
- ScreenshotOne uses the library for generating code examples in the playground for the screenshot API.
If you use the library, please, don't hesitate to share how and in what project.
krasun/requestcodegen
is released under the MIT license.