/Requestor

Primary LanguageRustGNU General Public License v3.0GPL-3.0

Contributors Forks Stargazers Issues GPLv3 License LinkedIn


Logo

Requestor

Lightweight API client
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Development
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

Product Name Screen Shot

The goal of this is to have a free, open source alternative to resource intensive usually electron based application lifeforms. It's pretty barebones right now but I plan on adding features as time goes by. It's written in Rust so it should be lightweight.

(back to top)

Built With

  • egui
  • eframe
  • ehttp

(back to top)

Features

The project is an attempt to create a lightweight API testing tool to counter the approach that current offering of costly, heavyweight tools. No subscriptions are planned, no cloud features. Simplicity is a priority and avoiding unnecessary feature bloat.

Goals

  • To be lightweight. This means startup time of the program is low, memory usage is low, processor usage is low.
  • To stay simple to use. The happiest flow of opening the program, inputting the url, send the request should be as straightforward as possible.
  • Stay subscription free, local and open source.

Non-goals

  • Feature bloat. Current offerings are very complex, for a small percentage of users this makes sense, this is not the goal for Requestor.
  • Cloud sync. Having some sort of instant sync across multiple machines seems unnecessary for a huge percentage of people using API testing tools.

Feature support

  • Tab support. You have a huge screen? Great, you can split the main window into multiple tabbed layouts and speed up testing of different scenarios.
  • Environment support. A simple key-value json file that can be loaded to provide an easy way to load secrets/fixed values across multiple requests.

Environment setup

To use environments you need to have a simple key/value json file setup.

Example contents:

{
  "url": "https://httpbin.org",
  "qs": "querystringvalue",
  "secret": "authheadervalue"
}

To use these values inside Requestor you need to load the file by clicking on the "Environment" dropdown within a tab and selecting "Load". The contents of the file will be read and stored in local app cache. If you change the file you can reload the contents by clicking on the 🔁 icon located in the upper right corner of the tab. After the file has been loaded you can preview the values by clicking on the ✅ icon located in the upper right corner of the tab.

After everything is ready you can use the curly-brace syntax, {key}, to inject the environment values into the inputs. Currently evaluated inputs are:

  • url
  • querystring keys and values
  • header keys and values

If you set the url to {url}/get and perform the request, the request will be sent to https://httpbin.org/get as per loaded environment values. If the value is not set in the environment it will not be replaced.

Development

The goal of this project isn't perfect code, and to add on top of that I am not a well versed Rust developer so any tips on improving code quality/performance are more than welcome but are not going to be the focus for me. To get a local copy up and running follow these simple example steps.

Prerequisites

Have cargo and Rust setup on your computer.

Installation

To use on Linux, first run:

sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev

After that you should be able to use cargo to run and build.

(back to top)

Running the project

To run the project locally just execute cargo run.

Building the project

To build the project execute cargo build.

(back to top)

Roadmap

  • Add a nice preview and json formatting options
  • Add environment configuration
  • Add project configuration
  • Add projects that contain saved requests

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

(back to top)

License

Distributed under the GPLv3 License. See LICENSE.txt for more information.

Project Link: https://github.com/lnenad/Requestor

(back to top)