 	/// - Parameter fields: Dictionary of field names and values to be set on the newly-inserted record.
 	/// - Returns: Promise of a string which holds the ID of the newly-inserted record
 	open func insert(type: String, fields: [String: Any]) -> Promise<String> {
-		return request(.insert(type: type, fields: fields, version: version)) {
-			Alamofire.request($0).validateSalesforceResponse().responseJSONDictionary()
-		}.then (on: q) {
-			(json) -> String in
+		return requestor.request(resource: .insert(type: type, fields: fields, version: version)).asJSON().then {
+			(json: [String: Any]) -> String in
 			guard let id = json["id"] as? String else {
-				throw SerializationError.invalid(json, message: "Cannot determine ID of inserted record!")
+				throw SerializationError.invalid(json, message: "Unable to determine ID of inserted record")
 			}
 			return id
 		}

	/// - Parameter fields: Optional array of field names to retrieve. If nil, all fields will be retrieved
	/// - Returns: Promise of a dictionary keyed by field names (aka "Record")
	open func retrieve(type: String, id: String, fields: [String]? = nil) -> Promise<Record> {
		return request(.retrieve(type: type, id: id, fields: fields, version: version)) {
			Alamofire.request($0).validateSalesforceResponse().responseJSONDictionary()
		}
	}
	
	/// Asynchronously retrieves multiple records of the same type, by ID

	/// - Parameter headers: Dictionary of HTTP header values
	/// - Returns: Promise of Data
	open func custom(method: HTTPMethod = .get, baseURL: URL? = nil, path: String? = nil, parameters: [String: Any]? = nil, headers: [String: String]? = nil) -> Promise<Data> {
		return requestor.request(resource: .custom(method: method, baseURL: baseURL, path: path, parameters: parameters, headers: headers))
	}
}
