Skip to content

Commit

Permalink
Fix getting response body from WP.com REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
crazytonyli committed Mar 8, 2024
1 parent d84d68f commit 20e92ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WordPressKit/WordPressComRestApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ open class WordPressComRestApi: NSObject {
parameters: [String: AnyObject]?,
completion: @escaping (Swift.Result<(Data, HTTPURLResponse?), Error>) -> Void) {
Task { @MainActor in
let result: APIResult<Data> = await perform(.get, URLString: URLString, parameters: parameters)
let result = await perform(.get, URLString: URLString, parameters: parameters, fulfilling: nil, decoder: { $0 })

completion(
result
Expand Down

0 comments on commit 20e92ac

Please sign in to comment.