APIRequest
public struct APIRequest
This structs represents a wrapper around an URL request to the GitLab API
-
HTTP Method
Declaration
Swift
public var method: HTTPMethod
-
URL Path
Declaration
Swift
public var path: String?
-
Query Parameters
Declaration
Swift
public var parameters: QueryParameters
-
JSON Dictionary
Declaration
Swift
public var jsonDictionary: JSONDictionary?
-
Data of the body
Declaration
Swift
public var data: Data?
-
GitLab API Version (v4 by default)
Declaration
Swift
public let apiVersion: String?
-
Undocumented
Declaration
Swift
public init(path: String = "", method: HTTPMethod = HTTPMethod.get, parameters: QueryParameters? = nil, jsonBody: JSONDictionary? = nil, data: Data? = nil, apiVersion: String? = RxGitLabAPIClient.apiVersionURLString)
-
Builds an URLRequest from the provided information
Declaration
Swift
public func buildRequest(with hostURL: URL, header: Header? = nil, page: Int? = nil, perPage: Int? = nil) -> URLRequest?
Parameters
hostURL
Host URL of the GitLab
header
HTTP headers
apiVersion
version of GitLab API
page
page if the endpoint is paginated
perPage
per_page if the endpoint is paginated
Return Value
URLRequest