mirror of
https://github.com/zhigang1992/swift-request.git
synced 2026-05-01 02:33:01 +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 baseURL = URL(string: "https://api.quotable.io")!
|
||||||
let service = QuoteService(baseURL: baseURL)
|
let service = QuoteService(baseURL: baseURL)
|
||||||
let (quotes, _) = try await service.getRandomQuotes(limit: 5)
|
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
|
## Supported HTTP Methods
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ do {
|
|||||||
let (quotes, _) = try await service.getRandomQuotes(limit: 3)
|
let (quotes, _) = try await service.getRandomQuotes(limit: 3)
|
||||||
print(quotes)
|
print(quotes)
|
||||||
|
|
||||||
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm")
|
let (quote, _) = try await service.getQuote(by: "69Ldsxcdm-")
|
||||||
print(quote)
|
print(quote)
|
||||||
} catch {
|
} catch {
|
||||||
print(error)
|
print(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user