This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Nickel | |
| use nickel::{Nickel, JsonBody, HttpRouter, Request, Response, MiddlewareResult, MediaType}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [dependencies] | |
| nickel = "0.7.3" | |
| hyper = "0.6.16" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src/main.rs:95:64: 95:94 error: the trait `hyper::header::Header` is not implemented for the type `hyper::header::common::authorization::Authorization<hyper::header::common::authorization::Bearer>` [E0277] | |
| src/main.rs:95 let auth_header = match request.origin.headers.get::<Authorization<Bearer>>() { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| src/main.rs:95:64: 95:94 error: the trait `hyper::header::HeaderFormat` is not implemented for the type `hyper::header::common::authorization::Authorization<hyper::header::common::authorization::Bearer>` [E0277] | |
| src/main.rs:95 let auth_header = match request.origin.headers.get::<Authorization<Bearer>>() { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let string_data = if i == 0 { | |
| format!("{}", data) | |
| } else { | |
| format!(",{}", data) | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Malformed JSON: Expected ',' instead of '{' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let string_data = if i == 0 { | |
| format!("{}", data) | |
| } else { | |
| format!("{},", data) | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Malformed JSON: Expected ',' instead of '{' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <nickel macros>:23:8: 23:26 warning: unused variable: `request`, #[warn(unused_variables)] on by default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src/main.rs:95:22: 95:37 error: failed to resolve. Use of undeclared type or module `MediaType` [ | |
| src/main.rs:95 response.set(MediaType::Json); | |
| ^~~~~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src/main.rs:95:9: 95:17 error: cannot borrow immutable argument `response` as mutable | |
| src/main.rs:95 response.set(MediaType::Json); |
NewerOlder