tycho-rpc 0.3.9

Public RPC service.
Documentation
1
2
3
4
5
6
7
8
9
10
use axum::extract::Request;

pub fn get_mime_type(req: &Request) -> Option<&str> {
    req.headers()
        .get(axum::http::header::CONTENT_TYPE)
        .and_then(|value| value.to_str().ok())
}

pub const APPLICATION_JSON: &str = "application/json";
pub const APPLICATION_PROTOBUF: &str = "application/x-protobuf";