{"action":"created","issue":{"url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/13","labels_url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/13/comments","events_url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/13/events","html_url":"https://github.com/BrandonRomano/wrecker/issues/13","id":89410734,"number":13,"title":"Suggestions for Minor Refactor","user":{"login":"benpate","id":4381040,"avatar_url":"https://avatars.githubusercontent.com/u/4381040?v=3","gravatar_id":"","url":"https://api.github.com/users/benpate","html_url":"https://github.com/benpate","followers_url":"https://api.github.com/users/benpate/followers","following_url":"https://api.github.com/users/benpate/following{/other_user}","gists_url":"https://api.github.com/users/benpate/gists{/gist_id}","starred_url":"https://api.github.com/users/benpate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpate/subscriptions","organizations_url":"https://api.github.com/users/benpate/orgs","repos_url":"https://api.github.com/users/benpate/repos","events_url":"https://api.github.com/users/benpate/events{/privacy}","received_events_url":"https://api.github.com/users/benpate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-18T22:17:43Z","updated_at":"2015-06-22T18:11:42Z","closed_at":null,"body":"I have a suggestion for a minor refactor of the API, which will hopefully make the flow a little easier to follow:\r\n\r\n1. Rename wrecker.WreckerRequest to simply wrecker.Request to reduce stutter\r\n\r\n2. Move wrecker.sendRequest() into the wrecker.Request object.  I think this functionality is more in line with the request than the root level object.\r\n\r\n3. Add a pointer to the http.Response object into the wrecker.Request struct.  This should satisfy the need to inspect and troubleshoot raw responses without complicating the API by adding another return value to each function.  It should also simplify request interceptors when it comes time to build those.\r\n\r\nI'm happy to do one, two, or all three of these as pull requests, but I figured I should ask before starting. :)"},"comment":{"url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/comments/114204436","html_url":"https://github.com/BrandonRomano/wrecker/issues/13#issuecomment-114204436","issue_url":"https://api.github.com/repos/BrandonRomano/wrecker/issues/13","id":114204436,"user":{"login":"BrandonRomano","id":2105067,"avatar_url":"https://avatars.githubusercontent.com/u/2105067?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonRomano","html_url":"https://github.com/BrandonRomano","followers_url":"https://api.github.com/users/BrandonRomano/followers","following_url":"https://api.github.com/users/BrandonRomano/following{/other_user}","gists_url":"https://api.github.com/users/BrandonRomano/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonRomano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonRomano/subscriptions","organizations_url":"https://api.github.com/users/BrandonRomano/orgs","repos_url":"https://api.github.com/users/BrandonRomano/repos","events_url":"https://api.github.com/users/BrandonRomano/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonRomano/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T18:11:42Z","updated_at":"2015-06-22T18:11:42Z","body":"> Rename wrecker.WreckerRequest to simply wrecker.Request to reduce stutter\r\n\r\nYes definitely, I agree with this... Much better!\r\n\r\n> Move wrecker.sendRequest() into the wrecker.Request object. I think this functionality is more in line with the request than the root level object.\r\n\r\nSo in it's current state, yes it is more in line with the request object.  After we add the request interceptor though that function is going to depend on the wrecker instance.  Logically, I think of it as wrecker is a client wrapper that provides a cleaner interface.\r\n\r\nI understand why you want this change, but I think as the library evolves we'll see that it actually should be associated to the wrecker instance... Let's hold off on this change for now, and revisit this in a month or so if we still think the same way!\r\n\r\n> Add a pointer to the http.Response object into the wrecker.Request struct. This should satisfy the need to inspect and troubleshoot raw responses without complicating the API by adding another return value to each function. It should also simplify request interceptors when it comes time to build those.\r\n\r\nHmm...  I'm not entirely sure on this one.  I'm more leaning towards a solution that I've proposed in #9.  Basically, firing off requests will return the response.  I think it would be a little odd if the user had to dig into the request, to get the response... no?\r\n\r\nI think the PR that I proposed provides the solution of exposing the response, but I think that would be a little bit of a better way of doing it then putting it in the request.\r\n\r\n> Per comments on Reddit, it would be good to split Params into separate structures for URL params and Form parameters.\r\n\r\nYeah I saw this one... We should probably use `WithUrlParam` and `WithFormParam`!"}}