Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    let mut headers = Headers::new();
    let mut response = Response::with((
        status::Ok, buffer));
    response.headers = headers;
    Maybe add such an example? This was hard to find for me. Also maybe add a convenience function for just creating a html response?
    Hi, I want to build a restful api. But I've confronted with some basic http and URL knowledge.
    For example, if i have a model named User, its restful root URL is : [host]/api/v1/users. Then i want to get some user's information filtered by fields of id and age. My questions are:
    Are the query strings placed in the iron::request::Request object or in the route?
    How can i realize it?
    Please help me. Thanks
    Is there any way to modify the Response body after creating it with a Response::with?
    The Writer is just very abstract...
    I'll just encaps the html instead,...
    Is there a way to shut the server thread down?
    Oh found: .close on iron::Listening
    Flavius Aspra
    @reem hi. would you have time to help me out with something regarding iron/persistent? I've asked everywhere on irc, noone could really help, and I noticed you're the top contributor to that project. I would really appreciate your help, and the project is open-source so it could benefit more people if it worked properly
    hi is there any url patterning middleware available for iron?
    Ian Henry
    Ivaylo Petrov Ivanov
    Hey guys - new to rust :D
    so I tried iron
    however, using ab, the results are quite modest..
    Requests per second: 9040.24 [#/sec] (mean)
    on the very same machine I got 43k with go lang
    I would assume that I'm not doing it correctly
    and building with cargo build
    is it correct?
    Ivaylo Petrov Ivanov
    sorry, was missing the --release flag
    David Ross
    Yep - that makes a huge difference! How were the results with --release?
    Ivaylo Petrov Ivanov
    48k per sec.
    using hyper only, 55k per sec
    Hellooo is anyone therreeee?
    Vignesh Sankaran
    Think there's an IRC channel you can try as well?
    Otherwise there's the #rust-webdev channel
    Hi! How can I create a server, that serves some API on / and falls back to serving files from disk if API route is not found?
    I tried the following:
    let mut mount = Mount::new();
    mount.mount("/", router)
        .mount("/", Static::new(Path::new("src/public/")));
    But it results in "no such file or directory" errors when I try to access the api.
    Hello :)
    wanted to check if anyone could tell me if there was any incompatibilities with running iron on the stable version of rust as opposed to the nightly
    my account not'd support
    Mohab Usama
    Hi, is there an example of Iron server with Authentication middleware? Is there a recommended lib?
    Marwan Rabbâa
    Hi, does iron support route constraint ?
    Cyprien Taque
    Hi, is iron an abandoned framework or is there still people using/developing it?