<commit_before>### Curl.jl

A little Julia client HTTP library. Curl.jl supports basic HTTP method usage
(GET, POST, DELETE ...) for making requests to HTTP web servers.

### Examples

  ```julia
  julia> using Curl

  julia> using JSON

  julia> r = Curl.get("http://jsonip.com")
  Response("{\"ip\":\"172.16.17.32\",\"about\":\"/about\"}",["HTTP/1.1 200 OK", "Server: nginx/1.2.6", "Date: Sun, 24 Feb 2013 02:36:34 GMT"  …  "Access-Control-Allow-Origin: *", "Access-Control-Allow-Methods: GET"])

  julia> r.text
  "{\"ip\":\"172.16.17.32\",\"about\":\"/about\"}"

  julia> r.headers[1]
  9-element String Array:
   "HTTP/1.1 200 OK"                    
   "Server: nginx/1.2.6"                
   "Date: Sun, 24 Feb 2013 03:24:08 GMT"
   "Content-Type: application/json"     
   "Transfer-Encoding: chunked"         
   "Connection: keep-alive"             
   "Vary: Accept-Encoding"              
   "Access-Control-Allow-Origin: *"     
   "Access-Control-Allow-Methods: GET"  

  julia> JSON.parse(Curl.get("http://jsonip.com").text)["ip"]
  "172.16.17.32"

  julia> Curl.post("http://requestb.in/181n1gk1", { :arg1 => "var1" }).text
  "ok\n"

  julia> Curl.delete("http://requestb.in/181n1gk1").text
  "ok\n"

  julia> Curl.head("http://requestb.in/181n1gk1")
  Response([["HTTP/1.1 200 OK", "Content-length: 3", "Content-Type: text/html; charset=utf-8", "Date: Sun, 24 Feb 2013 03:27:20 GMT", "Connection: keep-alive"]],"")

  julia> Curl.get("http://nytimes.com").text[1:92]
  "<!DOCTYPE html>\n<!--[if IE]><![endif]--> \n<html lang=\"en\">\n<head>\n<title>The New York Times "

  julia> Curl.get("http://nytimes.com").headers
  2-element Array{String,1} Array:
   ["HTTP/1.1 302 Found", "Date: Sun, 24 Feb 2013 03:29:06 GMT", "Server: Apache"  …  "Connection: close", "Content-Type: text/html; charset=iso-8859-1"]
   ["HTTP/1.1 200 OK", "Date: Sun, 24 Feb 2013 03:29:06 GMT", "Server: Apache"  …  "Connection: close", "Content-Type: text/html; charset=UTF-8"]        <commit_msg>Updated api to return a response object, better handling of response headers<commit_after>### Curl.jl

A little Julia client HTTP library. Curl.jl supports basic HTTP method usage
(GET, POST, DELETE ...) for making requests to HTTP web servers.

### Examples

  ```julia
  julia> using Curl

  julia> using JSON

  julia> Curl.get("http://jsonip.com").text
  "{\"ip\":\"172.16.17.32\",\"about\":\"/about\"}"

  julia> Curl.get("http://jsonip.com").headers[1]
  9-element String Array:
   "HTTP/1.1 200 OK"                    
   "Server: nginx/1.2.6"                
   "Date: Sun, 24 Feb 2013 03:34:17 GMT"
   "Content-Type: application/json"     
   "Transfer-Encoding: chunked"         
   "Connection: keep-alive"             
   "Vary: Accept-Encoding"              
   "Access-Control-Allow-Origin: *"     
   "Access-Control-Allow-Methods: GET"  

  julia> JSON.parse(Curl.get("http://jsonip.com").text)["ip"]
  "172.16.17.32"

  julia> Curl.post("http://requestb.in/181n1gk1", { :arg1 => "var1" }).text
  "ok\n"

  julia> Curl.delete("http://requestb.in/181n1gk1").text
  "ok\n"

  julia> Curl.head("http://requestb.in/181n1gk1").text
  ""

  julia> Curl.get("http://nytimes.com").text[1:92]
  "<!DOCTYPE html>\n<!--[if IE]><![endif]--> \n<html lang=\"en\">\n<head>\n<title>The New York Times "

  julia> Curl.get("http://nytimes.com").headers[2]
  12-element String Array:
   "HTTP/1.1 200 OK"                                                                                               
   "Date: Sun, 24 Feb 2013 03:36:02 GMT"                                                                           
   "Server: Apache"                                                                                                
   "expires: Thu, 01 Dec 1994 16:00:00 GMT"                                                                        
   "cache-control: no-cache"                                                                                       
   "pragma: no-cache"                                                                                              
   "Set-Cookie: RMID=007f0100629751298aa2003f; Expires=Mon, 24 Feb 2014 03:36:02 GMT; Path=/; Domain=.nytimes.com;"
   "Set-cookie: adxcs=-; path=/; domain=.nytimes.com"                                                              
   "Vary: Host"                                                                                                    
   "Content-Length: 168147"                                                                                        
   "Connection: close"                                                                                             
   "Content-Type: text/html; charset=UTF-8"  
{'fraction_non_alphanumeric': 0.16148274392841927, 'fraction_numerical': 0.05986365573072007, 'mean_word_length': 1.5796703296703296, 'pattern_counts': {'":': 6, '<': 15, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3560259', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1466, 'n_words': 313}