From 404fe652d726c19e4fd26f29ec9fb4d8a7277701 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Wed, 10 Feb 2021 13:05:11 +0100 Subject: [PATCH] Add POST request to WP.org rest Api --- WordPressKit/WordPressOrgRestApi.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WordPressKit/WordPressOrgRestApi.swift b/WordPressKit/WordPressOrgRestApi.swift index e62e1845..85b55e30 100644 --- a/WordPressKit/WordPressOrgRestApi.swift +++ b/WordPressKit/WordPressOrgRestApi.swift @@ -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,