{"action":"created","issue":{"url":"https://api.github.com/repos/alexvictoor/mock4net/issues/19","repository_url":"https://api.github.com/repos/alexvictoor/mock4net","labels_url":"https://api.github.com/repos/alexvictoor/mock4net/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/alexvictoor/mock4net/issues/19/comments","events_url":"https://api.github.com/repos/alexvictoor/mock4net/issues/19/events","html_url":"https://github.com/alexvictoor/mock4net/issues/19","id":157109165,"number":19,"title":"Proposal to send a Func when creating Responses","user":{"login":"iKarthik","id":3451786,"avatar_url":"https://avatars.githubusercontent.com/u/3451786?v=3","gravatar_id":"","url":"https://api.github.com/users/iKarthik","html_url":"https://github.com/iKarthik","followers_url":"https://api.github.com/users/iKarthik/followers","following_url":"https://api.github.com/users/iKarthik/following{/other_user}","gists_url":"https://api.github.com/users/iKarthik/gists{/gist_id}","starred_url":"https://api.github.com/users/iKarthik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iKarthik/subscriptions","organizations_url":"https://api.github.com/users/iKarthik/orgs","repos_url":"https://api.github.com/users/iKarthik/repos","events_url":"https://api.github.com/users/iKarthik/events{/privacy}","received_events_url":"https://api.github.com/users/iKarthik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-27T00:53:34Z","updated_at":"2016-05-29T19:38:42Z","closed_at":null,"body":"Wouldn't it be a good idea if we can pass a Func while creating the Responses, this way when the response is being creating, the func will be invoked which then will decide the response\r\nFor example\r\n\r\n```\r\nserver\r\n  .Given(\r\n    Requests.WithUrl(\"/api\").UsingGet()\r\n  )\r\n  .RespondWith(\r\n    Responses\r\n      .WithStatusCode(200)\r\n      .WithResponseFunc((request) => new Response())\r\n  ); \r\n\r\n```\r\nIn the lambda, we can decide what response to send. \r\nThoughts?\r\nKay"},"comment":{"url":"https://api.github.com/repos/alexvictoor/mock4net/issues/comments/222378553","html_url":"https://github.com/alexvictoor/mock4net/issues/19#issuecomment-222378553","issue_url":"https://api.github.com/repos/alexvictoor/mock4net/issues/19","id":222378553,"user":{"login":"alexvictoor","id":437172,"avatar_url":"https://avatars.githubusercontent.com/u/437172?v=3","gravatar_id":"","url":"https://api.github.com/users/alexvictoor","html_url":"https://github.com/alexvictoor","followers_url":"https://api.github.com/users/alexvictoor/followers","following_url":"https://api.github.com/users/alexvictoor/following{/other_user}","gists_url":"https://api.github.com/users/alexvictoor/gists{/gist_id}","starred_url":"https://api.github.com/users/alexvictoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexvictoor/subscriptions","organizations_url":"https://api.github.com/users/alexvictoor/orgs","repos_url":"https://api.github.com/users/alexvictoor/repos","events_url":"https://api.github.com/users/alexvictoor/events{/privacy}","received_events_url":"https://api.github.com/users/alexvictoor/received_events","type":"User","site_admin":false},"created_at":"2016-05-29T19:38:42Z","updated_at":"2016-05-29T19:38:42Z","body":"Hello Kay\r\nRespondWith() method already takes as a parameter a IProvideResponses object.\r\nSo you can already implement this interface to buid a dynamic way a response.\r\nDo you think we should replace this interface by a delegate in order to be able to use lambdas?\r\nRegards\r\n\r\nAlex"}}
{"actor":{"display_login":"alexvictoor"}}