This crate is a general purpose library for common types found when working with the HTTP protocol. You’ll find Request and Response types for working as either a client or a server as well as all of their components. Notably you’ll find Uri for what a Request is requesting, a Method for how it’s being requested, a StatusCode for what sort of response came back, a Version for how this was communicated, and HeaderName/HeaderValue definitions to get grouped in a HeaderMap to work with request/response headers. You will notably not find an implementation of sending requests or spinning up a server in this crate. It’s intended that this crate is the “standard library” for HTTP clients and servers without dictating any particular implementation. Note that this crate is still early on in its lifecycle so the support libraries that integrate with the http crate are a work in progress! Stay tuned and we’ll be sure to highlight crates here in the future.

Features

  • HTTP header interpretation and generation
  • Parse header names from strings
  • Header values can be created from string literals through the from_static function
  • Header values can also be parsed like names
  • Each HTTP Request has an associated URI with it
  • A general purpose library of common HTTP types

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow HTTP

HTTP Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of HTTP!

Additional Project Details

Programming Language

Rust

Related Categories

Rust HTTP Servers, Rust HTTP Clients

Registered

2023-05-17