MCPcopy Index your code
hub / github.com/dxx/feignhttp

github.com/dxx/feignhttp @v0.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.1 ↗ · + Follow
488 symbols 962 edges 84 files 17 documented · 3% updated 39d agov0.6.1 · 2026-05-30★ 60
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FeignHTTP

crates.io Documentation MIT licensed CI

FeignHTTP is a declarative HTTP client. Based on rust macros.

Features

  • Easy to use
  • Asynchronous request
  • Configurable timeout settings
  • Supports plain text, form, multipart and JSON
  • Selectable HTTP backends (reqwest, reqwest-middleware or isahc)

Usage

FeignHTTP mark macros on asynchronous functions, you need a runtime for support async/await. You can use tokio.

tokio:

[dependencies]
tokio = { version = "1", features = ["full"] }

Add feignhttp in your Cargo.toml and use default feature:

feignhttp = { version = "0.6" }

Then add the following code:

use feignhttp::get;

#[get("https://api.github.com")]
async fn github() -> feignhttp::Result<String> {}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let r = github().await?;
    println!("result: {}", r);

    Ok(())
}

The get attribute macro specifies get request, feignhttp::Result<String> specifies the return result. It will send get request to https://api.github.com and receive a plain text body.

Using non-default HTTP backend:

feignhttp = { version = "0.6", default-features = false, features = ["isahc-client"] }

The default-features = false option disable default reqwest.

For more examples, click here.

Documentation

Read the documentation for more details.

License

FeignHTTP is provided under the MIT license. See LICENSE.

Extension points exported contracts — how you extend this code

FileLike (Interface)
(no doc) [3 implementers]
src/multipart.rs
Client (Interface)
A trait for HTTP client. [1 implementers]
src/http.rs
FeignContext (Interface)
(no doc)
src/context.rs
Feign (Interface)
(no doc)
tests/test_feign_custom.rs
RequestTimeout (Interface)
(no doc)
tests/test_feign_config.rs
Feign (Interface)
(no doc)
tests/test_feign_trait.rs
GitHub (Interface)
(no doc)
examples/config.rs
GitHub (Interface)
(no doc)
examples/custom_client.rs

Core symbols most depended-on inside this repo

build
called by 46
src/http.rs
method
called by 20
src/http.rs
url
called by 18
src/http.rs
find_type_name_vars
called by 16
codegen/src/func.rs
send
called by 13
src/isahc/http.rs
filter_struct
called by 8
codegen/src/func.rs
find_type_name_vars
called by 8
codegen/src/leagcy.rs
bytes
called by 6
src/multipart.rs

Shape

Function 230
Method 176
Class 53
Interface 24
Enum 5

Languages

Rust100%

Modules by API surface

src/ser/map.rs36 symbols
src/ser/value.rs30 symbols
src/reqwest_middleware/http.rs23 symbols
src/reqwest/http.rs23 symbols
src/isahc/http.rs23 symbols
codegen/src/util.rs22 symbols
codegen/src/func.rs20 symbols
src/error.rs19 symbols
tests/test_feign_request.rs17 symbols
src/multipart.rs17 symbols
src/http.rs15 symbols
codegen/src/leagcy.rs14 symbols

For agents

$ claude mcp add feignhttp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page