8 releases (3 stable)

1.0.3 Apr 23, 2023
1.0.1 May 3, 2022
1.0.0 Mar 12, 2022
0.3.2-alpha Jan 20, 2022
0.1.0-alpha Jan 8, 2022

#75 in #request-response

24 downloads per month

GPL-2.0 license

35KB
625 lines

Menemen

Crates.io Version Documentation

Menemen is a Turkish food and also simple streaming http/https client.

use std::io::{Write, Read};
use menemen::request::{Request, RequestTypes};

fn main() {
    let mut request = Request::new("http://postman-echo.com/get", RequestTypes::GET).unwrap();
    let mut response = request.send().unwrap();
    let mut text_buffer = Vec::new();
    response.stream.read_to_end(&mut text_buffer);
    println!("Text: {}", String::from_utf8_lossy(&text_buffer));
}

Examples

You can find examples here


lib.rs:

Menemen

Menemen is a Turkish food and also simple streaming http/https client.

Usage

use std::io::{Write, Read};
use menemen::request::{Request, RequestTypes};

fn main() {
   let mut request = Request::new("http://postman-echo.com/get", RequestTypes::GET).unwrap();
   let mut response = request.send().unwrap();
   let mut text_buffer = Vec::new();
   response.stream.read_to_end(&mut text_buffer);
   println!("Text: {}", String::from_utf8_lossy(&text_buffer));
}

You can find more examples here

Dependencies

~0.2–9MB
~94K SLoC