{"id":51652662,"url":"https://github.com/codebasepk/requestsj","last_synced_at":"2026-07-14T05:02:40.383Z","repository":{"id":45081405,"uuid":"99144048","full_name":"codebasepk/requestsj","owner":"codebasepk","description":"Inspired by Python's Requests","archived":false,"fork":false,"pushed_at":"2022-01-10T09:24:11.000Z","size":195,"stargazers_count":2,"open_issues_count":4,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-06-30T00:43:58.471Z","etag":null,"topics":["android","http","requests"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebasepk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-02T17:30:50.000Z","updated_at":"2022-01-10T08:36:51.000Z","dependencies_parsed_at":"2022-09-04T17:11:04.549Z","dependency_job_id":null,"html_url":"https://github.com/codebasepk/requestsj","commit_stats":null,"previous_names":["byteshaft/requests"],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/codebasepk/requestsj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebasepk%2Frequestsj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebasepk%2Frequestsj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebasepk%2Frequestsj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebasepk%2Frequestsj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebasepk","download_url":"https://codeload.github.com/codebasepk/requestsj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebasepk%2Frequestsj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35446929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","http","requests"],"created_at":"2026-07-14T05:02:39.685Z","updated_at":"2026-07-14T05:02:40.377Z","avatar_url":"https://github.com/codebasepk.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RequestsJ\nRequests Java (Android, really)\n\nDISCLAIMER: INSPIRED BY BUT NOT ASSOCIATED WITH https://github.com/psf/requests\n\n# Getting started\nThe build is hosted on jcenter so you could just add the line:\n\n```\nimplementation 'pk.codebase.requests:requests:0.6'\n```\n\n# Usage\nThe API is written for simplicity, below examples provide a peak into it.\n\n### GET\n```java\nHttpRequest request = new HttpRequest();\nrequest.setOnResponseListener(new HttpRequest.OnResponseListener() {\n    @Override\n    public void onResponse(HttpResponse response) {\n        if (response.code == HttpResponse.HTTP_OK) {\n            System.out.println(response.toJSONObject());\n        }\n    }\n});\nrequest.setOnErrorListener(new HttpRequest.OnErrorListener() {\n    @Override\n    public void onError(HttpError error) {\n        // There was an error, deal with it\n    }\n});\nrequest.get(\"https://httpbin.org/get\");\n```\n\n### POST\n```java\nHttpRequest request = new HttpRequest();\nrequest.setOnResponseListener(new HttpRequest.OnResponseListener() {\n    @Override\n    public void onResponse(HttpResponse response) {\n        if (response.code == HttpResponse.HTTP_OK) {\n            System.out.println(response.toJSONObject());\n        }\n    }\n});\nrequest.setOnErrorListener(new HttpRequest.OnErrorListener() {\n    @Override\n    public void onError(HttpError error) {\n        // There was an error, deal with it\n    }\n});\n\nJSONObject json;\ntry {\n    json = new JSONObject();\n    json.put(\"foo\", \"bar\");\n    json.put(\"jane\", \"doe\");\n} catch (JSONException ignore) {\n    return;\n}\nrequest.post(\"https://httpbin.org/post\", json);\n```\n### PUT, PATCH and DELETE\nThese methods are also supported and expected the same set of parameters as POST. The convenience methods are\nrequest.put();\nrequest.patch();\nrequest.delete();\n\n### Custom Headers\nHeaders can be sent using the `HttpHeaders` class.\n```java\nHttpHeaders headers = new HttpHeaders(\"Authorization\", \"Token sasdasdai2sadas\")\nrequest.get(\"https://httpbin.org/get\", headers);\n```\n### FormData\n```java\nFormData data = new FormData();\ndata.put(\"foo\", \"bar\");\ndata.put(\"file2\", new File(\"/sdcard/image.png\"));\nrequest.post(\"https://httpbin.org/post\", data);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebasepk%2Frequestsj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebasepk%2Frequestsj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebasepk%2Frequestsj/lists"}