{"action":"created","issue":{"url":"https://api.github.com/repos/actix/actix-web/issues/179","repository_url":"https://api.github.com/repos/actix/actix-web","labels_url":"https://api.github.com/repos/actix/actix-web/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/actix/actix-web/issues/179/comments","events_url":"https://api.github.com/repos/actix/actix-web/issues/179/events","html_url":"https://github.com/actix/actix-web/issues/179","id":314255945,"number":179,"title":".with(json) always returning 404","user":{"login":"Unmoving","id":16563063,"avatar_url":"https://avatars0.githubusercontent.com/u/16563063?v=4","gravatar_id":"","url":"https://api.github.com/users/Unmoving","html_url":"https://github.com/Unmoving","followers_url":"https://api.github.com/users/Unmoving/followers","following_url":"https://api.github.com/users/Unmoving/following{/other_user}","gists_url":"https://api.github.com/users/Unmoving/gists{/gist_id}","starred_url":"https://api.github.com/users/Unmoving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unmoving/subscriptions","organizations_url":"https://api.github.com/users/Unmoving/orgs","repos_url":"https://api.github.com/users/Unmoving/repos","events_url":"https://api.github.com/users/Unmoving/events{/privacy}","received_events_url":"https://api.github.com/users/Unmoving/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-13T21:29:28Z","updated_at":"2018-04-13T21:37:22Z","closed_at":null,"author_association":"NONE","body":"Trying out the minimal example from `0.5`, just slightly adapted:\r\n\r\n```\r\n#[macro_use]\r\nextern crate lazy_static;\r\nextern crate regex;\r\n#[macro_use]\r\nextern crate slog;\r\nextern crate slog_term;\r\n\r\nextern crate actix;\r\nextern crate actix_web;\r\nextern crate http;\r\nextern crate bincode;\r\nextern crate serde_json;\r\n\r\nextern crate futures;\r\nextern crate diesel;\r\n\r\nuse actix_web::{\r\n   Json,\r\n   Result,\r\n   dev::Handler,\r\n};\r\n\r\nfn main() -> () {\r\n    actix_web::server::new(|| actix_web::App::new().resource(\r\n      \"/api/json\",\r\n      |r| r.method(actix_web::http::Method::POST).with(json))\r\n   ).bind(\"localhost:8000\").expect(\"Cannot bind to localhost:8000\")\r\n       .run();\r\n}\r\n\r\nfn json(req: Json<serde_json::Value>) -> Result<String> {\r\n   println!(\"Here\");\r\n   Ok(format! {\"Request received\"})\r\n}\r\n```\r\n\r\nNo matter which json I send to `localhost:8000/api/json` I always get a \r\n> 400 Bad Request\r\n\r\nand **no** \"Here\" printed on the std::out :(\r\n\r\nWhat am I doing wrong?\r\n\r\n[dependencies] of `Cargo.toml`:\r\n```\r\ndotenv = \"0.10\"\r\nregex = \"0.2\"\r\nbincode = \"^1.0\"\r\n\r\nlazy_static = \"1.0.0\"\r\nserde = \"^1.0\"\r\nserde_derive = \"^1.0\"\r\nserde_json = \"^1.0\"\r\n\r\nslog = \"2.1\"\r\nslog-term = \"2.3\"\r\n\r\nactix = \"^0.5\"\r\nactix-web = \"^0.5\"\r\nhttp = \"^0.1.4\"\r\nfutures = \"0.1.17\"\r\n\r\ndiesel = { version = \"1.1\", features = [\"sqlite\"] }\r\n```"},"comment":{"url":"https://api.github.com/repos/actix/actix-web/issues/comments/381266804","html_url":"https://github.com/actix/actix-web/issues/179#issuecomment-381266804","issue_url":"https://api.github.com/repos/actix/actix-web/issues/179","id":381266804,"user":{"login":"fafhrd91","id":598990,"avatar_url":"https://avatars2.githubusercontent.com/u/598990?v=4","gravatar_id":"","url":"https://api.github.com/users/fafhrd91","html_url":"https://github.com/fafhrd91","followers_url":"https://api.github.com/users/fafhrd91/followers","following_url":"https://api.github.com/users/fafhrd91/following{/other_user}","gists_url":"https://api.github.com/users/fafhrd91/gists{/gist_id}","starred_url":"https://api.github.com/users/fafhrd91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fafhrd91/subscriptions","organizations_url":"https://api.github.com/users/fafhrd91/orgs","repos_url":"https://api.github.com/users/fafhrd91/repos","events_url":"https://api.github.com/users/fafhrd91/events{/privacy}","received_events_url":"https://api.github.com/users/fafhrd91/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T21:37:22Z","updated_at":"2018-04-13T21:37:22Z","author_association":"COLLABORATOR","body":"do you send `content-type`?"}}
{"actor":{"display_login":"fafhrd91"}}