<commit_before>//
//  Request.swift
//  Swallow
//
//  Created by <NAME> on 2/25/15.
//  Copyright (c) 2015 TheHolyGrail. All rights reserved.
//

import Foundation

public protocol URLRequestConstructible {
    func constructURLRequest() -> NSURLRequest
}

public protocol URLConvertible {
    var URLValue: NSURL { get }
}

extension String: URLConvertible {
    public var URLValue: NSURL {
        return NSURL(string: self)!
    }
}

/**
 Encapsulates the data required to send an HTTP request.
*/
public struct Request {
    
    public enum Method: String {
        case GET = "GET"
        case HEAD = "HEAD"
        case POST = "POST"
        case PUT = "PUT"
        case DELETE = "DELETE"
    }
    
    public enum Headers {
        static let userAgent = "User-Agent"
        static let contentType = "Content-Type"
        static let accept = "Accept"
        static let cacheControl = "Cache-Control"
    }
    
    public enum ParameterEncoding {<commit_msg>use struct for HTTP header constants<commit_after>//
//  Request.swift
//  Swallow
//
//  Created by <NAME> on 2/25/15.
//  Copyright (c) 2015 TheHolyGrail. All rights reserved.
//

import Foundation

public protocol URLRequestConstructible {
    func constructURLRequest() -> NSURLRequest
}

public protocol URLConvertible {
    var URLValue: NSURL { get }
}

extension String: URLConvertible {
    public var URLValue: NSURL {
        return NSURL(string: self)!
    }
}

/**
 Encapsulates the data required to send an HTTP request.
*/
public struct Request {
    
    public enum Method: String {
        case GET = "GET"
        case HEAD = "HEAD"
        case POST = "POST"
        case PUT = "PUT"
        case DELETE = "DELETE"
    }
    
    public struct Headers {
        public static let userAgent = "User-Agent"
        public static let contentType = "Content-Type"
        public static let accept = "Accept"
        public static let cacheControl = "Cache-Control"
    }
    
    public enum ParameterEncoding {
{'fraction_non_alphanumeric': 0.09095452273863068, 'fraction_numerical': 0.008995502248875561, 'mean_word_length': 2.347826086956522, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2316154', 'n_tokens_mistral': 598, 'n_tokens_neox': 571, 'n_words': 195}