{"id":48680786,"url":"https://github.com/reisub/HttPizza","last_synced_at":"2026-04-26T20:00:40.724Z","repository":{"id":69026388,"uuid":"50866545","full_name":"reisub/HttPizza","owner":"reisub","description":"Lightweight HTTP client for Android apps","archived":true,"fork":false,"pushed_at":"2016-02-23T21:33:36.000Z","size":131,"stargazers_count":52,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-05-27T14:25:18.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reisub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-02-01T19:53:59.000Z","updated_at":"2023-01-28T13:40:03.000Z","dependencies_parsed_at":"2023-05-07T05:35:44.900Z","dependency_job_id":null,"html_url":"https://github.com/reisub/HttPizza","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/reisub/HttPizza","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisub%2FHttPizza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisub%2FHttPizza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisub%2FHttPizza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisub%2FHttPizza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reisub","download_url":"https://codeload.github.com/reisub/HttPizza/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisub%2FHttPizza/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-11T01:00:36.064Z","updated_at":"2026-04-26T20:00:40.709Z","avatar_url":"https://github.com/reisub.png","language":"Java","funding_links":[],"categories":["网络编程"],"sub_categories":["Spring Cloud框架"],"readme":"# HttPizza\n\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Download](https://api.bintray.com/packages/reisub/maven/httpizza/images/download.svg) ](https://bintray.com/reisub/maven/httpizza/_latestVersion)\n[![Method count](https://img.shields.io/badge/Methods count-365-e91e63.svg)](http://www.methodscount.com/?lib=sexy.code%3Ahttpizza%3A0.3.0)\n[![Coverage Status](https://coveralls.io/repos/github/reisub/HttPizza/badge.svg?branch=master)](https://coveralls.io/github/reisub/HttPizza?branch=master)\n\nLightweight HTTP client using [HttpURLConnection](http://developer.android.com/intl/es/reference/java/net/HttpURLConnection.html) under the hood.\nThe primary use case is for apps, libraries and SDKs which don't need/want all the features ([and methods!](http://www.methodscount.com/?lib=com.squareup.okhttp3%3Aokhttp%3A3.0.1)) OkHttp provides.\n\nIt has the same limitations as HttpURLConnection like not supporting the PATCH method and not permitting request body in DELETE requests.\n\n## Usage\n\nAdd the library as a dependency to your ```build.gradle``` to automatically download it from jcenter.\n\n```groovy\ncompile 'sexy.code:httpizza:0.3.0'\n```\n\nWe also maintain a [changelog](CHANGELOG.md).\n\n### Create a client\n\n```java\nHttPizza client = new HttPizza();\n```\n\n### GET request\n\n```java\nRequest request = client.newRequest()\n        .url(url)\n        .get()\n        .build();\n\nResponse response = client.newCall(request).execute();\n```\n\n### POST request\n\n```java\nRequest request = client.newRequest()\n        .url(url)\n        .post(RequestBody.create(MediaType.parse(\"text/plain; charset=utf-8\"), \"requestBody\"))\n        .build();\n\nResponse response = client.newCall(request).execute();\n```\n\n### Async GET request\n\n```java\nRequest request = client.newRequest()\n        .url(url)\n        .build();\n\nclient.newCall(request).enqueue(new Callback() {\n    @Override\n    public void onResponse(Response response) {\n        if (response.isSuccessful()) {\n            Timber.d(\"Body: %s\", response.body().string());\n        } else {\n            Timber.d(\"Status code: %s\", response.code());\n        }\n    }\n\n    @Override\n    public void onFailure(Throwable t) {\n        Timber.e(t.getMessage());\n    }\n});\n```\n\n### POST request with form parameters\n\n```java\nRequestBody formBody = new FormBody.Builder()\n        .add(\"search\", \"Airplane!\")\n        .build();\n\nRequest request = client.newRequest()\n        .url(url)\n        .post(formBody)\n        .build();\n\nResponse response = client.newCall(request).execute();\n```\n\n## Credits\n\nHttPizza reuses parts of [OkHttp](https://github.com/square/okhttp) and is largely based on [lighthttp](https://github.com/satorufujiwara/lighthttp).\n\nIt also draws inspiration from [OkHttp](https://github.com/square/okhttp) and [Retrofit](https://github.com/square/retrofit) APIs.\n\n## Contributing\n\nFeedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same [license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freisub%2FHttPizza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freisub%2FHttPizza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freisub%2FHttPizza/lists"}