We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6cc058 commit c3561ddCopy full SHA for c3561dd
AndroidAsync-Kotlin/README.md
@@ -12,11 +12,27 @@ suspend fun getTheRobotsTxt() {
12
.await()
13
14
val githubRobots = Ion.with(context)
15
- .load("https://google.com/robots.txt")
+ .load("https://github.com/robots.txt")
16
.asString()
17
18
19
return googleRobots + githubRobots
20
```
21
22
That's it!
23
+
24
+But remember that the await() suspends, so if you want to fetch both robots.txt at the same time:
25
26
+```kotlin
27
+suspend fun getTheRobotsTxt() {
28
+ val googleRobots = Ion.with(context)
29
+ .load("https://google.com/robots.txt")
30
+ .asString()
31
32
+ val githubRobots = Ion.with(context)
33
34
35
36
+return googleRobots.await() + githubRobots.await()
37
+```
38
0 commit comments