Skip to content

Commit

Permalink
Add POST request to WP.org rest Api
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Mar 29, 2023
1 parent 0d39246 commit 404fe65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WordPressKit/WordPressOrgRestApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ open class WordPressOrgRestApi: NSObject, WordPressRestApi {
return request(method: .get, path: path, parameters: parameters, completion: completion)
}

@discardableResult
open func POST(_ path: String,
parameters: [String: AnyObject]?,
completion: @escaping Completion) -> Progress? {
return request(method: .post, path: path, parameters: parameters, completion: completion)
}

@discardableResult
open func request(method: HTTPMethod,
path: String,
Expand Down

0 comments on commit 404fe65

Please sign in to comment.