You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Makes a request via HTTP and Decodes the response
85
+
/// - Parameters:
86
+
/// - decodableResponse: Decodable - An object that represents the response body
87
+
/// - urlString: URL domain + path as a string: `"abc.com/some/path"`
88
+
/// - validator: `(Int) -> Bool` - A function to validate the response code of the request. By default, makeRequest() will fail if the status code does not fall within the 200 - 299 range. To override this, pass in a function that compares the status code and returns a boolean. True == success, False == failure. Upon failure an error will be thrown that contains the HTTPURLResponse for inspection.
89
+
///
90
+
/// - Returns: AnyPubliser<Data, Error>
91
+
///
92
+
/// -- Validation
93
+
///
94
+
/// By default the validation checks for a 200-299 status code and fails if the code is out of bounds
/// Makes a request via HTTP, Encodes the body and Decodes the response
109
+
/// - Parameters:
110
+
/// - decodableResponse: Decodable - An object that represents the response body
111
+
/// - urlString: URL domain + path as a string: `"abc.com/some/path"`
112
+
/// - body: Encodable?: The encodable object that represents body data to send with a request
113
+
/// - validator: `(Int) -> Bool` - A function to validate the response code of the request. By default, makeRequest() will fail if the status code does not fall within the 200 - 299 range. To override this, pass in a function that compares the status code and returns a boolean. True == success, False == failure. Upon failure an error will be thrown that contains the HTTPURLResponse for inspection.
114
+
///
115
+
/// - Returns: AnyPubliser<Data, Error>
116
+
///
117
+
/// -- Validation
118
+
///
119
+
/// By default the validation checks for a 200-299 status code and fails if the code is out of bounds
/// Makes a request via HTTP, Encodes the body and Decodes the response
135
+
/// - Parameters:
136
+
/// - decodableResponse: Decodable - An object that represents the response body
137
+
/// - urlString: URL domain + path as a string: `"abc.com/some/path"`
138
+
/// - validator: `(Int) -> Bool` - A function to validate the response code of the request. By default, makeRequest() will fail if the status code does not fall within the 200 - 299 range. To override this, pass in a function that compares the status code and returns a boolean. True == success, False == failure. Upon failure an error will be thrown that contains the HTTPURLResponse for inspection.
139
+
///
140
+
/// - Returns: AnyPubliser<Data, Error>
141
+
///
142
+
/// -- Validation
143
+
///
144
+
/// By default the validation checks for a 200-299 status code and fails if the code is out of bounds
0 commit comments