Our great sponsors
- Revelo Payroll - Free Global Payroll designed for tech teams
- SonarLint - Clean code begins in your IDE with SonarLint
- Onboard AI - Learn any GitHub repo in 59 seconds
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
-
I happened to have learned about parsing expression grammars a few days ago and got really excited about writing my own grammar. As I was missing this VS Code extension when working on neovim, an idea popped up: What if I write an HTTP grammar and an execute request from an interactive prompt?
-
After a quick check of the available rust http client libraries I opted for reqwest. It has a pretty simple API and it seems to be among the most used libraries for this matters. But I'm a bit concerned about all its dependencies so I might try ureq later.
-
Revelo Payroll
Free Global Payroll designed for tech teams. Building a great tech team takes more than a paycheck. Zero payroll costs, get AI-driven insights to retain best talent, and delight them with amazing local benefits. 100% free and compliant.
-
To write our grammar we will use pest. From the website:
-
After a quick check of the available rust http client libraries I opted for reqwest. It has a pretty simple API and it seems to be among the most used libraries for this matters. But I'm a bit concerned about all its dependencies so I might try ureq later.
-
At this point I felt a bit lazy to implement the prompt so I searched for existing solutions, one of them being inquire. It has a pretty straight forward API, so to show an interactive select we just need this lines:
-
This project turned out to be quite fun! I ended up naming it rq and you can see its source here
Related posts
- Hyper – A fast and correct HTTP implementation for Rust
- Hyper – A fast and correct HTTP implementation for Rust
- Hyper – A fast and correct HTTP implementation for Rust
- Using Auth0 with Tauri
- How can I save a blob:<url> to my hard disk? Im currently using Rust to scrape a website, however I dont even know if that is possible