<commit_before>//
//  RequestType.swift
//  Restofire
//
//  Created by <NAME> on 24/03/16.
//  Copyright © 2016 AarKay. All rights reserved.
//

import Alamofire

public protocol RequestType: class {

    associatedtype Model
    var path: String { get set }
    
    //Optionals
    var baseURL: String { get }
    var method: Alamofire.Method { get }
    var encoding: Alamofire.ParameterEncoding { get }
    var headers: [String : String]? { get }
    var parameters: AnyObject? { get set }
    var rootKeyPath: String? { get }
    var logging: Bool { get }
    
    var configuration: Configuration { get }
    
}

public extension RequestType {

    public var configuration: Configuration {
        get { return Configuration.defaultConfiguration }
    }
    
    public var baseURL: String {
        get { return configuration.baseURL }
    }
    
    public var method: Alamofire.Method {
        get { return configuration.method }
    }
    
    public var encoding: Alamofire.ParameterEncoding {
        get { return configuration.encoding }
    }
    
    public var headers: [String: String]? {
        get { return configuration.headers }
    }
    
    public var parameters: AnyObject? {
        get { return nil }
        set {}
    }
    
    public var rootKeyPath: String? {
        get { return configuration.rootKeyPath }
    }
    <commit_msg>Remove Parameters { set } from RequestType<commit_after>//
//  RequestType.swift
//  Restofire
//
//  Created by <NAME> on 24/03/16.
//  Copyright © 2016 AarKay. All rights reserved.
//

import Alamofire

public protocol RequestType: class {

    associatedtype Model
    var path: String { get set }
    
    //Optionals
    var baseURL: String { get }
    var method: Alamofire.Method { get }
    var encoding: Alamofire.ParameterEncoding { get }
    var headers: [String : String]? { get }
    var parameters: AnyObject? { get }
    var rootKeyPath: String? { get }
    var logging: Bool { get }
    
    var configuration: Configuration { get }
    
}

public extension RequestType {

    public var configuration: Configuration {
        get { return Configuration.defaultConfiguration }
    }
    
    public var baseURL: String {
        get { return configuration.baseURL }
    }
    
    public var method: Alamofire.Method {
        get { return configuration.method }
    }
    
    public var encoding: Alamofire.ParameterEncoding {
        get { return configuration.encoding }
    }
    
    public var headers: [String: String]? {
        get { return configuration.headers }
    }
    
    public var parameters: AnyObject? {
        get { return nil }
    }
    
    public var rootKeyPath: String? {
        get { return configuration.rootKeyPath }
    }
    
{'fraction_non_alphanumeric': 0.08600583090379009, 'fraction_numerical': 0.007288629737609329, 'mean_word_length': 2.221830985915493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7116921', 'n_tokens_mistral': 795, 'n_tokens_neox': 768, 'n_words': 236}