minhttp 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in minhttp.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+ MinHTTP
2
+ =======
3
+
4
+ An HTTP library for the minimalist. MinHTTP allows you to send and receive raw HTTP requests. It's a very thin wrapper around EventMachine's connect method with some SSL validation added. It uses http_parser.rb for very fast HTTP parsing.
5
+
6
+ Example:
7
+
8
+ require 'minhttp'
9
+
10
+ data = <<-HTTP
11
+ GET / HTTP/1.0\r
12
+ Host: www.google.com\r
13
+
14
+ HTTP
15
+
16
+ EventMachine::run do
17
+ Http::Min.connect("www.yahoo.com", data) do |raw_response, parsed_response|
18
+ puts "Received #{parsed_response.status_code} status from Google"
19
+ puts "First 100 characters of raw HTTP response:"
20
+ puts raw_response[0..100]
21
+ EM::stop
22
+ end
23
+ end
24
+
25
+
26
+ Features:
27
+
28
+ * Issue an exact HTTP request
29
+ * See the exact HTTP response
30
+ * See the parsed HTTP response
31
+ * Validate the certificate of the server
32
+
33
+
34
+ Non-Features:
35
+
36
+ * get() or post() helper methods (plenty of other HTTP libraries have these)
37
+
38
+
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rake/testtask'
5
+
6
+ desc 'Test the mini_magick plugin.'
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << 'test'
9
+ t.pattern = 'test/**/*_test.rb'
10
+ t.verbose = true
11
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1