requestcodegen
v0.0.3
Published
A library to generate HTTP client example code in different programming languages.
Downloads
47
Readme
requestcodegen
requestcodegen is a library to generate HTTP client example code in different programming languages.
Install
npm install requestcodegen --saveUse
Using the library is as easy as:
import { generateCode } from "requestcodegen";
const clojureCodeExample = generateCode(
{ url: "http://example.com", method: "POST" },
CodeTarget.Clojure
);Build and publish (a manual for developers)
To build and publish the library:
- Bump the version property in the
package.jsonfile. - Run
npm run prepare. - Run
npm publish.
Code Examples
Check out examples of generated code in the examples.md file.
Known usages
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.
License
krasun/requestcodegen is released under the MIT license.
