Coder Social home page Coder Social logo

krasun / requestcodegen Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 100 KB

A library to generate HTTP client example code in different programming languages.

License: MIT License

JavaScript 0.14% TypeScript 99.86%
code-generation codegenerator curl http http-client typescript-library

requestcodegen's Introduction

requestcodegen

Build NPM package

requestcodegen is a library to generate HTTP client example code in different programming languages.

Install

npm install requestcodegen --save

Use

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:

  1. Bump the version property in the package.json file.
  2. Run npm run prepare.
  3. Run npm publish.

Generate code

OPENAI_MODEL=<model> OPENAI_BASE_URL="<OpenAI API base URL>" OPENAI_API_KEY="OpenAI API key" npm run generate src/generators

Known usages

A few examples of how the library is used:

  1. 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.

requestcodegen's People

Contributors

krasun avatar danmindru avatar

Stargazers

Norbert Jurga avatar Andreas Scheucher avatar Maciej Pulikowski avatar Mihai Voinea avatar Matthias Neumayer avatar  avatar Harish Kumar avatar Valentin Hutter avatar Sai Krishna avatar Naveen MC avatar Agustinus Nathaniel avatar Lubomir Georgiev (Любомир Георгиев) avatar Max Prilutskiy avatar  avatar  avatar THROYAN avatar Andrey M avatar  avatar

Watchers

 avatar Andreas Scheucher avatar  avatar

Forkers

danmindru

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.