Giter Site home page Giter Site logo

rq's Introduction

rq

rq-core

preview

rq is an interactive HTTP client that parses and execute requests. It attempts to provide a minimal CLI alternative to vscode-restclient. rq follows the standard RFC 2616.

Blogpost: https://protiumx.github.io/blog/posts/an-http-request-parser-with-rust-and-pest-rs/

This project was born out of my boredom and curiosity about PEG. I'm wishing it will with help of the open source community.

Dependencies

Packages

rq-core

Contains the core functionality: pest grammar and request execution.

rq-cli

CLI application that uses tui-rs to render all the requests and a buffer to show responses. This package is the default target for cargo workspaces.

Run rq-cli with cargo:

cargo run -- requests.http

HTTP Request Grammar

The pest grammar can be found here. You can use the pest editor to try it out and check how it works.

Explanation

-- request --
{request_line}\r\n
{header \r\n \r\n}*
{body \r\n}*

A request is conformed by: { request_line, headers, body}, where headers and body are optional matches. A request_line is conformed by: { method, target, version }. A headers is a collection of header { header_name, header_value } A body is anything that doesn't match headers and has a preceding line break, as specified in the RFC.

Contributing

PRs are always welcomed. Refer to the project TODO list for ideas!

Sponsorship

If you find this project useful you can support my work with:

Buy Me A Coffee

rq's People

Contributors

dependabot[bot] avatar protiumx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rq's Issues

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.