{"id":13989410,"url":"https://github.com/kymjs/RxVolley","last_synced_at":"2025-07-22T10:32:30.693Z","repository":{"id":43457944,"uuid":"48973062","full_name":"kymjs/RxVolley","owner":"kymjs","description":"RxVolley = Volley + RxJava(RxJava3.0) + OkHttp(OkHttp3)","archived":false,"fork":false,"pushed_at":"2022-06-27T09:25:37.000Z","size":370,"stargazers_count":1159,"open_issues_count":6,"forks_count":233,"subscribers_count":61,"default_branch":"master","last_synced_at":"2024-11-29T01:34:26.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://kymjs.com/","language":"Java","has_issues":false,"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/kymjs.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":"2016-01-04T03:38:41.000Z","updated_at":"2024-11-13T13:04:30.000Z","dependencies_parsed_at":"2022-09-18T17:50:21.022Z","dependency_job_id":null,"html_url":"https://github.com/kymjs/RxVolley","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kymjs%2FRxVolley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kymjs%2FRxVolley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kymjs%2FRxVolley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kymjs%2FRxVolley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kymjs","download_url":"https://codeload.github.com/kymjs/RxVolley/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227079366,"owners_count":17727996,"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-08-09T13:01:38.360Z","updated_at":"2025-07-22T10:32:29.880Z","avatar_url":"https://github.com/kymjs.png","language":"Java","funding_links":[],"categories":["Java","网络编程"],"sub_categories":[],"readme":"[![OSL](https://kymjs.com/qiniu/image/logo3.png)](https://kymjs.com/works/)\n=================\n\n\u003e RxVolley = Volley + RxAndroid3 + OkHttp3\n\n[中文帮助](https://github.com/kymjs/RxVolley/blob/master/Readme_zh.md)   \n\n## Retrofit? No, I Love Volley.\nRxVolley is modified Volley. Removed the HttpClient, and support RxJava.   \n\nIf you are building with Gradle, simply add the following line to the ```dependencies``` section of your ```build.gradle``` file:   \n\nlatest version numbers: [![](https://jitpack.io/v/kymjs/RxVolley.svg)](https://jitpack.io/#kymjs/RxVolley)\n\n\u003eimplementation 'com.github.kymjs.rxvolley:rxvolley:3.0.6'  \n\u003e\n\u003e// If use okhttp function    \n\u003eimplementation 'com.github.kymjs.rxvolley:okhttp3:3.0.6'  \n\u003e//or okhttp2   \n\u003eimplementation 'com.github.kymjs.rxvolley:okhttp:3.0.6'\n\u003e\n\u003e// If use image-loader function  \n\u003eimplementation 'com.github.kymjs.rxvolley:image:3.0.6'\n\n\n## Getting Started\nBuilder pattern to create objects.    \n\n#### Callback method do Get request and contenttype is form  \n\n```\nHttpParams params = new HttpParams();\n\n//http header, optional parameters\nparams.putHeaders(\"cookie\", \"your cookie\");\nparams.putHeaders(\"User-Agent\", \"rxvolley\"); \n\n//request parameters\nparams.put(\"name\", \"kymjs\");\nparams.put(\"age\", \"18\");\n\nHttpCallback callBack = new HttpCallback(){\n\t@Override\n    public void onSuccess(String t) {\n    }\n    @Override\n    public void onFailure(int errorNo, String strMsg) {\n    }\n}\n\nnew RxVolley.Builder()\n\t.url(\"https://www.kymjs.com/rss.xml\")\n    .httpMethod(RxVolley.Method.GET) //default GET or POST/PUT/DELETE/HEAD/OPTIONS/TRACE/PATCH\n    .cacheTime(6) //default: get 5min, post 0min\n    .contentType(RxVolley.ContentType.FORM)//default FORM or JSON\n    .params(params)\n    .shouldCache(true) //default: get true, post false\n    .callback(callBack)\n    .encoding(\"UTF-8\") //default\n    .doTask();\n```\n\n#### Callback method do Post request and contenttype is json  \n\n```\n\nString paramJson = \"{\\n\" +\n                \"    \\\"name\\\": \\\"kymjs\\\", \" +\n                \"    \\\"age\\\": \\\"18\\\" \" +\n                \"}\";\n\n//request parameters, json format\nHttpParams params = new HttpParams();\nparams.putJsonParams(paramJson);\n\n// upload progress\nProgressListener listener = new ProgressListener(){\n    @Override\n    public void onProgress(long transferredBytes, long totalSize){\n    }\n}\n\nnew RxVolley.Builder()\n\t.url(\"https://www.kymjs.com/rss.xml\")\n    .httpMethod(RxVolley.Method.POST) //default GET or POST/PUT/DELETE/HEAD/OPTIONS/TRACE/PATCH\n    .cacheTime(6) //default: get 5min, post 0min\n    .params(params)\n    .contentType(RxVolley.ContentType.JSON)\n    .shouldCache(true) //default: get true, post false\n    .progressListener(listener) //upload progress\n    .callback(callback)\n    .encoding(\"UTF-8\") //default\n    .doTask();\n```\n\n#### return Observable\\\u003cResult\\\u003e type\n\n```\nObservable\u003cResult\u003e observable = new RxVolley.Builder()\n\t.url(\"https://www.kymjs.com/rss.xml\")\n    .httpMethod(RxVolley.Method.POST) //default GET or POST/PUT/DELETE/HEAD/OPTIONS/TRACE/PATCH\n    .cacheTime(6) //default: get 5min, post 0min\n    .params(params)\n    .contentType(RxVolley.ContentType.JSON)\n    .getResult(); \n    \n//do something\nobservable.subscribe(subscriber);\n``` \n\n## Requirements\n\nRxVolley can be included in any Android application.  \n\nRxVolley supports Android 3.1, API12 (HONEYCOMB_MR1) and later.  \n\n## License\n\nLicensed under the Apache License Version 2.0.  [The \"License\"](http://www.apache.org/licenses/LICENSE-2.0)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkymjs%2FRxVolley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkymjs%2FRxVolley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkymjs%2FRxVolley/lists"}