 	
 	// Required
 	/// End Point.
-	/// Must start with a /.
 	/// e.g. /cards/:id/dislike
 	var endpoint: String { get }
 	/// Will transform given data to requested type of response.

    }
}

private func jsonArrayResponseHandler<Response: JSONDecodable>(_ data: Data, progress: Progress) throws -> [Response] {
	let json = JSON(data: data)
	guard json.type == Type.array else { throw JSONDecodableError.parseError }
	var responses: [Response] = []

    public var headers: [String : String] { return [:] }
	
	public var networkClient: NetworkClientType { return NetworkClient() }
	public var progress: Progress? { return nil }
}

extension NetworkRequest where ResponseType: JSONDecodable {
	public var responseHandler: (Data) throws -> ResponseType { return jsonResponseHandler }
	public var arrayResponseHandler: (Data, Progress?) throws -> [ResponseType] { return jsonArrayResponseHandler }
}

extension NetworkRequest where ResponseType == IgnorableResult {
	public var responseHandler: (Data) throws -> ResponseType { return ignorableResponseHandler }
	public var arrayResponseHandler: (Data, Progress?) throws -> [ResponseType] { return ignorableArrayResponseHandler }
}

private func jsonResponseHandler<Response: JSONDecodable>(_ data: Data) throws -> Response {
