{"action":"created","issue":{"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129","labels_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129/comments","events_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129/events","html_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129","id":111735368,"number":129,"title":"Add methods to create `OHHTPStubResponse`s from `NSURL`s","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-10-16T00:40:03Z","updated_at":"2015-10-17T22:02:23Z","closed_at":"2015-10-17T21:29:48Z","pull_request":{"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129","html_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129","diff_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129.diff","patch_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129.patch"},"body":"iOS 4 allowed using `NSURL`s instead of `NSString`s for file paths. This PR allows using `NSURL`s to create `OHHTPStubResponse`s, which provides better compatibility with test code already using `NSURL`s.\r\n\r\nI copied each test using `responseWithFileAtPath:statusCode:headers:` and used `responseWithURL:statusCode:headers:` there instead. This ends up duplicating a lot of code, but I know some people prefer that for tests, and this seemed in line with the existing tests.\r\n\r\nAn alternate implementation of this PR could be to implement the `NSURL` methods in terms of `NSString` based file paths, or vice versa."},"comment":{"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/comments/148955057","html_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129#issuecomment-148955057","issue_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129","id":148955057,"user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T22:02:23Z","updated_at":"2015-10-17T22:02:23Z","body":"Thanks for all your help @AliSoftware and @samirGuerdah! I think this came out great"}}