A web application framework for the Rust Programming Language.
Questions tagged [nickel]
21 questions
0
votes
1 answer
Nickel server using Let's Encrypt certificate has a handshake error when accessed with rustls
I'm trying to create a small REST-like API that should be secured with HTTPS. I want to use the nickel crate for the server and hyper_rustls and hyper for the client.
The server is running great as long as I use a browser, curl or a REST client to…

f4bi4n
- 13
- 1
- 4
0
votes
1 answer
How to send a value to a Nickel Middleware function
Consdier the following code:
extern crate nickel;
use nickel::{Nickel, HttpRouter, Request, Response, MiddlewareResult};
fn main() {
let data = "wanted";
let mut server = Nickel::new();
server.get("/", landing);
…

tshepang
- 12,111
- 21
- 91
- 136
0
votes
0 answers
Cargo fails to build openssl
I'm building a web application using nickel.rs. Everything's going fine but when I execute cargo run, I get the following error because of the hyper dependancy:
Compiling openssl-sys-extras v0.7.9
Compiling openssl-sys v0.7.9
Compiling…

menawi
- 399
- 3
- 13
-1
votes
1 answer
How to properly write the return type by looking at the Trait definition in rust
I am having wrapping my head around how to figure out the return type of a function when I try to wrap them in other function.
I sometimes use a work-around, where I have a struct with the fields representing what I would pass if I could write the…

argentum47
- 2,385
- 1
- 18
- 20
-1
votes
1 answer
nickel.rs post redirect not found
I am using nickel.rs, PostgreSQL, and Angular.js. I can insert into my table with an HTTP POST:
// insert
{
let conn = shared_connection.clone();
router.post("/api/movies", middleware! { |request, mut response|
let conn =…

shinriyo
- 344
- 3
- 17
-3
votes
1 answer
How to return a JSON file using a Nickel template?
I'm trying to return a JSON file using a Nickel template. I found some API sample code that returns a JSON response and modified it:
extern crate rustc_serialize;
#[macro_use]
extern crate nickel;
use nickel::{Nickel, HttpRouter, JsonBody};
use…

kai
- 492
- 3
- 18