mirror of
https://github.com/zhigang1992/swift-request.git
synced 2026-01-12 17:52:47 +08:00
Fix quote id of sample
This commit is contained in:
@@ -25,7 +25,7 @@ To make a request using SwiftRequest, you can do the following:
|
||||
let baseURL = URL(string: "https://api.quotable.io")!
|
||||
let service = QuoteService(baseURL: baseURL)
|
||||
let (quotes, _) = try await service.getRandomQuotes(limit: 5)
|
||||
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm")
|
||||
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm-")
|
||||
```
|
||||
|
||||
## Supported HTTP Methods
|
||||
|
||||
@@ -7,7 +7,7 @@ do {
|
||||
let (quotes, _) = try await service.getRandomQuotes(limit: 3)
|
||||
print(quotes)
|
||||
|
||||
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm")
|
||||
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm-")
|
||||
print(quote)
|
||||
} catch {
|
||||
print(error)
|
||||
|
||||
Reference in New Issue
Block a user