http-rs / http-rs/tide

Clone Box<DynEndpoint<State>>

Open
#329 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
5.1k
Forks
329
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

## Detailed Description
Add `Route#any` method, registers a route that matches all the HTTP methods.
So need `Box>` is cloneable.

## Context

## Possible Implementation
```rust
/// Add an endpoint for all method requests
pub fn any(&mut self, ep: impl Endpoint) -> &mut Self {
self.method(http::Method::GET, ep);
// GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, CONNECT, TRACE.
self.method(http::Method::TRACE, ep);
self
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.