[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7560":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},7560,"retrofit2-kotlin-coroutines-adapter","JakeWharton\u002Fretrofit2-kotlin-coroutines-adapter","JakeWharton","A Retrofit 2 adapter for Kotlin coroutine's Deferred type.",null,"Kotlin",1963,126,1,7,0,54.31,"Apache License 2.0",true,false,"master",[],"2026-06-12 04:00:34","Kotlin Coroutine Adapter (DEPRECATED)\n========================\n\nA Retrofit 2 `CallAdapter.Factory` for [Kotlin coroutine's][1] `Deferred`.\n\nThis library is deprecated. Please migrate to Retrofit 2.6.0 or newer and its [built-in `suspend` support](https:\u002F\u002Fgithub.com\u002Fsquare\u002Fretrofit\u002Fblob\u002Fmaster\u002FCHANGELOG.md#version-260-2019-06-05)\n\n\nUsage\n-----\n\nAdd `CoroutineCallAdapterFactory` as a `Call` adapter when building your `Retrofit` instance:\n```kotlin\nval retrofit = Retrofit.Builder()\n    .baseUrl(\"https:\u002F\u002Fexample.com\u002F\")\n    .addCallAdapterFactory(CoroutineCallAdapterFactory())\n    .build()\n```\n\nYour service methods can now use `Deferred` as their return type.\n```kotlin\ninterface MyService {\n  @GET(\"\u002Fuser\")\n  fun getUser(): Deferred\u003CUser>\n\n  \u002F\u002F or\n\n  @GET(\"\u002Fuser\")\n  fun getUser(): Deferred\u003CResponse\u003CUser>>\n}\n```\n\n\nDownload\n--------\n\nIf you are using Kotlin 1.3, download [the latest JAR][2] or grab via [Maven][3]:\n```xml\n\u003Cdependency>\n  \u003CgroupId>com.jakewharton.retrofit\u003C\u002FgroupId>\n  \u003CartifactId>retrofit2-kotlin-coroutines-adapter\u003C\u002FartifactId>\n  \u003Cversion>0.9.2\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\nor [Gradle][3]:\n```groovy\nimplementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'\n```\n\nIf you are using Kotlin pre-1.3 and experimental coroutines, download [its latest JAR][4] or grab\nvia [Maven][5]:\n```xml\n\u003Cdependency>\n  \u003CgroupId>com.jakewharton.retrofit\u003C\u002FgroupId>\n  \u003CartifactId>retrofit2-kotlin-coroutines-experimental-adapter\u003C\u002FartifactId>\n  \u003Cversion>1.0.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\nor [Gradle][5]:\n```groovy\nimplementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-experimental-adapter:1.0.0'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\n\nLicense\n=======\n\n    Copyright 2017 Jake Wharton\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n\n [1]: https:\u002F\u002Fkotlinlang.org\u002Fdocs\u002Freference\u002Fcoroutines.html\n [2]: https:\u002F\u002Fsearch.maven.org\u002Fremote_content?g=com.jakewharton.retrofit&a=retrofit2-kotlin-coroutines-adapter&v=LATEST\n [3]: http:\u002F\u002Fsearch.maven.org\u002F#search%7Cga%7C1%7Cg%3A%22com.jakewharton.retrofit%22%20a%3A%22retrofit2-kotlin-coroutines-adapter%22\n [4]: https:\u002F\u002Fsearch.maven.org\u002Fremote_content?g=com.jakewharton.retrofit&a=retrofit2-kotlin-coroutines-experimental-adapter&v=LATEST\n [5]: http:\u002F\u002Fsearch.maven.org\u002F#search%7Cga%7C1%7Cg%3A%22com.jakewharton.retrofit%22%20a%3A%22retrofit2-kotlin-coroutines-experimental-adapter%22\n [snap]: https:\u002F\u002Foss.sonatype.org\u002Fcontent\u002Frepositories\u002Fsnapshots\u002F\n","该项目提供了一个Retrofit 2适配器，用于支持Kotlin协程的Deferred类型。其核心功能是通过添加`CoroutineCallAdapterFactory`作为调用适配器，使得服务方法能够以Deferred作为返回类型，从而实现异步网络请求与Kotlin协程的无缝集成。此库适用于需要利用Kotlin协程进行后台任务处理，并且希望以更简洁、易读的方式编写网络请求代码的应用场景中。不过需要注意的是，该库已被弃用，对于新项目推荐直接使用Retrofit 2.6.0及以上版本自带的`suspend`函数支持来替代。",2,"2026-06-11 03:13:03","top_language"]