{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/20881","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/20881/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/20881/comments","events_url":"https://api.github.com/repos/akka/akka/issues/20881/events","html_url":"https://github.com/akka/akka/issues/20881","id":163811241,"number":20881,"title":"Create a 'strictEntity' directive","user":{"login":"Joe-Edwards","id":9695026,"avatar_url":"https://avatars.githubusercontent.com/u/9695026?v=3","gravatar_id":"","url":"https://api.github.com/users/Joe-Edwards","html_url":"https://github.com/Joe-Edwards","followers_url":"https://api.github.com/users/Joe-Edwards/followers","following_url":"https://api.github.com/users/Joe-Edwards/following{/other_user}","gists_url":"https://api.github.com/users/Joe-Edwards/gists{/gist_id}","starred_url":"https://api.github.com/users/Joe-Edwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joe-Edwards/subscriptions","organizations_url":"https://api.github.com/users/Joe-Edwards/orgs","repos_url":"https://api.github.com/users/Joe-Edwards/repos","events_url":"https://api.github.com/users/Joe-Edwards/events{/privacy}","received_events_url":"https://api.github.com/users/Joe-Edwards/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/1%20-%20triaged","name":"1 - triaged","color":"5319e7"},{"url":"https://api.github.com/repos/akka/akka/labels/community","name":"community","color":"009800"},{"url":"https://api.github.com/repos/akka/akka/labels/t:http","name":"t:http","color":"CCCCCC"},{"url":"https://api.github.com/repos/akka/akka/labels/t:http:server:dsl","name":"t:http:server:dsl","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/55","html_url":"https://github.com/akka/akka/milestones/2.4.x","labels_url":"https://api.github.com/repos/akka/akka/milestones/55/labels","id":1257017,"number":55,"title":"2.4.x","description":"","creator":{"login":"patriknw","id":336161,"avatar_url":"https://avatars.githubusercontent.com/u/336161?v=3","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"open_issues":270,"closed_issues":1,"state":"open","created_at":"2015-08-16T17:29:51Z","updated_at":"2016-07-12T18:36:15Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-07-05T09:45:36Z","updated_at":"2016-07-12T21:08:11Z","closed_at":null,"body":"From #20850 \r\n\r\nA `Directive1[HttpEntity.Strict]` which calls toStrict on the HTTP Entity safely with a specified timeout (to avoid the deadlock in the other ticket). N.B. should also replace the entity in the request context."},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/232181854","html_url":"https://github.com/akka/akka/issues/20881#issuecomment-232181854","issue_url":"https://api.github.com/repos/akka/akka/issues/20881","id":232181854,"user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T21:08:11Z","updated_at":"2016-07-12T21:08:11Z","body":"The optimisation is not needed, toStrict does the right thing (returns \"this\") if the entity is Strict already.\r\n\r\nI was more thinking of making a directive that works via mapRequest, i.e. it transforms the entity transparently.\r\n\r\n\r\n```scala\r\nstrictEntity { // toStricts, but we can do various things inside\r\n  extractDataBytes { // works since strict already\r\n    // .. \r\n  } ~ get { \r\n    extractRequest { r => r.entity.dataBytes .... } \r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"ktoso"}}