forked from square/retrofit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fill in a bunch of missing or slightly incorrect documentation.
- Loading branch information
1 parent
210be05
commit 61f97fc
Showing
4 changed files
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
Retrofit Adapters | ||
================= | ||
|
||
TODO | ||
Retrofit ships with a default adapter for executing `Call` instances. The child modules contained | ||
herein are additional adapters for other popular execution mechanisms. | ||
|
||
To use, supply an instance of your desired converter when building your `Retrofit` instance. | ||
|
||
```java | ||
Retrofit retrofit = new Retrofit.Builder() | ||
.baseUrl("https://api.example.com") | ||
.addCallAdapterFactory(RxJavaCallAdapterFactory.create()) | ||
.build(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
Retrofit Converters | ||
=================== | ||
|
||
Retrofit ships with a default converter for JSON that uses Gson but the library is content-format | ||
agnostic. The child modules contained herein are additional converters for other popular formats. | ||
Retrofit ships with support for OkHttp's `RequestBody` and `ResponseBody` types but the library is | ||
content-format agnostic. The child modules contained herein are additional converters for other | ||
popular formats. | ||
|
||
To use, supply an instance of your desired converter when building your `Retrofit` instance. | ||
|
||
```java | ||
Retrofit retrofit = new Retrofit.Builder() | ||
.baseUrl("https://api.example.com") | ||
.converter(new ProtoConverter()) | ||
.addConverterFactory(GsonConverterFactory.create()) | ||
.build(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters