Carnivore HTTP
Provides HTTP Carnivore::Source
Usage
HTTP
All requests are processed via single source
require 'carnivore'
require 'carnivore-http'
Carnivore.configure do
source = Carnivore::Source.build(
:type => :http,
:args => {
:port => 8080
}
)
endHTTP with configured end points
All point builder definitions are hooked into source:
require 'carnivore'
require 'carnivore-http'
Carnivore.configure do
source = Carnivore::Source.build(
:type => :http_endpoints,
:args => {
:auto_respond => false
}
)
end.start!HTTP paths
Multiple sources share same listener, and incoming messages are matched based on HTTP method + path
require 'carnivore'
require 'carnivore-http'
Carnivore.configure do
source = Carnivore::Source.build(
:type => :http_paths,
:args => {
:port => 8080,
:path => '/test',
:method => 'get'
}
)
endAvailable options for :args
-
:bindaddress to bind -
:portport to listen -
:auto_respondconfirm request immediately -
:sslssl configuration-
:certpath to cert file -
:keypath to key file
-
-
:authorizationaccess restrictors-
:allowed_originslist of IP or IP ranges -
:htpasswdhtpasswd for authentication -
:credentialsusername/password key pair for authentication -
:valid_on'any' match any restrictor, 'all' match all restrictors
-
-
:endpointspecific uri to transmit (can include auth + path) -
:methodHTTP method for transmission
Info
- Carnivore: https://github.com/carnivore-rb/carnivore
- Repository: https://github.com/carnivore-rb/carnivore-http
- IRC: Freenode @ #carnivore