{"id":17129000,"url":"https://github.com/michaelhenry/hijackr","last_synced_at":"2025-09-09T13:49:49.242Z","repository":{"id":56914550,"uuid":"205207844","full_name":"michaelhenry/Hijackr","owner":"michaelhenry","description":"An Easy to use response mocker to your URLRequest for Unit/UITesting!","archived":false,"fork":false,"pushed_at":"2019-09-06T07:37:47.000Z","size":26,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T20:23:51.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelhenry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-29T16:40:34.000Z","updated_at":"2021-02-12T13:09:32.000Z","dependencies_parsed_at":"2022-08-21T02:50:59.648Z","dependency_job_id":null,"html_url":"https://github.com/michaelhenry/Hijackr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelhenry%2FHijackr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelhenry%2FHijackr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelhenry%2FHijackr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelhenry%2FHijackr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelhenry","download_url":"https://codeload.github.com/michaelhenry/Hijackr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245207416,"owners_count":20577672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:08:36.021Z","updated_at":"2025-03-24T04:22:21.645Z","avatar_url":"https://github.com/michaelhenry.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hijackr🛩\n\n[![CI Status](https://img.shields.io/travis/michaelhenry/Hijackr.svg?style=flat)](https://travis-ci.org/michaelhenry/Hijackr)\n[![Version](https://img.shields.io/cocoapods/v/Hijackr.svg?style=flat)](https://cocoapods.org/pods/Hijackr)\n[![License](https://img.shields.io/cocoapods/l/Hijackr.svg?style=flat)](https://cocoapods.org/pods/Hijackr)\n[![Platform](https://img.shields.io/cocoapods/p/Hijackr.svg?style=flat)](https://cocoapods.org/pods/Hijackr)\n\n## Installation\n\nHijackr is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Hijackr'\n```\n\n## How to Use\n\nTo register:\n\n```swift\nHijackr.register()\n```\n\nTo unregister:\n\n```swift\nHijackr.unregister()\n```\n\nTo hijack a request:\n\n```swift\nHijackr.hijack(request: request, with: response)\n```\n\nExample:\n\n```swift\nlet request =  URLRequest(url: URL(string: \"https://www.google.com\")!)\nlet response = Hijackr.Response(statusCode: 200, body: \"hello\".data(using: .utf8))\nHijackr.hijack(request: request, with: response)\n```\n\n## UnitTest\n\nTest Cases can be found [here](/Example/Tests/)\n\n## Author\n\nmichaelhenry, me@iamkel.net\n\n## License\n\nHijackr is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelhenry%2Fhijackr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelhenry%2Fhijackr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelhenry%2Fhijackr/lists"}