gitwtfhub

wtf is rocket-post-as-delete?

misterio77/rocket-post-as-delete — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2022-01-08

RustAudience · developerComplexity · 2/5DormantSetup · easy

TL;DR

A plugin for the Rocket web framework in Rust that lets plain HTML forms trigger proper DELETE requests. It rewrites POST submissions to URLs ending in /delete into DELETE requests, so you can avoid writing JavaScript for delete buttons.

Mindmap

Mindmap is still cooking. Refresh in a few.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Build an admin dashboard with delete buttons using only standard HTML forms.

REASON 2

Remove items from a list in a server app without writing any front-end JavaScript.

REASON 3

Keep server-side delete routes clean and REST-compliant in a Rust web application.

What's in the stack?

RustRocket

How it stacks up

misterio77/rocket-post-as-delete0xr10t/pulsefi404-agent/codes-miner
Stars00
LanguageRustRustRust
Last pushed2022-01-08
MaintenanceDormant
Setup difficultyeasyhardmoderate
Complexity2/54/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires an existing Rocket web application in Rust to plug into.

Wtf does this do

When you build a web page with a form to delete something, you hit a frustrating limitation: plain HTML forms can only submit data using "POST" or "GET" actions. They cannot send a "DELETE" request, which is the technically correct way to tell a server to remove an item. This small tool, rocket-post-as-delete, solves that mismatch. It lets you use standard, no-JavaScript-required HTML forms to trigger proper delete actions on your server. It works as a plugin for Rocket, a framework for building web applications in the Rust programming language. You plug it into your app, and it silently intercepts incoming requests. If it sees a form submission sent via POST to an address ending in "/delete" (like "/items/42/delete"), it automatically rewrites that request into a proper DELETE command (like "/items/42"). Your server then processes it exactly as if a DELETE request had been sent from the start. This is useful for web developers who want to keep their server code clean and follow best practices without being forced to write extra JavaScript just to send a delete request. For example, if you are building an admin dashboard with a simple "Delete User" button, you can just use a standard HTML form. You do not need to add complex front-end code or client-side scripts to make that button work properly with modern web standards. The project makes a straightforward tradeoff: it embraces a simple URL naming convention to work around a limitation of HTML itself. By requiring you to add "/delete" to the end of your form's target addresses, it provides a seamless bridge between old-school HTML forms and modern server-side routing, keeping your application's logic tidy without adding unnecessary complexity to the user interface.

Yoink these prompts

Prompt 1
Add rocket-post-as-delete to my existing Rocket Rust app so that standard HTML forms with POST to /delete endpoints are automatically treated as DELETE requests.
Prompt 2
Show me a minimal Rocket route handler in Rust that works with rocket-post-as-delete to let an HTML form delete an item by id.
Prompt 3
Create a standard HTML form with no JavaScript that deletes a user account when rocket-post-as-delete is installed on the server side in Rocket.

Frequently asked questions

wtf is rocket-post-as-delete?

A plugin for the Rocket web framework in Rust that lets plain HTML forms trigger proper DELETE requests. It rewrites POST submissions to URLs ending in /delete into DELETE requests, so you can avoid writing JavaScript for delete buttons.

What language is rocket-post-as-delete written in?

Mainly Rust. The stack also includes Rust, Rocket.

Is rocket-post-as-delete actively maintained?

Dormant — no commits in 2+ years (last push 2022-01-08).

How hard is rocket-post-as-delete to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is rocket-post-as-delete for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.