Module: HTTP

Defined in:
lib/http_client/client.rb,
lib/http_client/methods.rb

Defined Under Namespace

Classes: Client, Request, URIBuilder

Constant Summary collapse

DefaultHttpClient =
org.apache.http.impl.client.DefaultHttpClient
BasicResponseHandler =
org.apache.http.impl.client.BasicResponseHandler
BasicHttpParams =
org.apache.http.params.BasicHttpParams
HttpHost =
org.apache.http.HttpHost
CoreProtocolPNames =
org.apache.http.params.CoreProtocolPNames
CoreConnectionPNames =
org.apache.http.params.CoreConnectionPNames
ConnRoutePNames =
org.apache.http.conn.params.ConnRoutePNames
CookieSpecPNames =
org.apache.http.cookie.params.CookieSpecPNames
AuthPNames =
org.apache.http.auth.params.AuthPNames
ClientPNames =
org.apache.http.client.params.ClientPNames
SocketTimeoutException =
java.net.SocketTimeoutException
Post =
Request.create_type do |uri_builder, path, params, encoding|
  post = HttpPost.new(uri_builder.create_uri(path))
  post.entity = UrlEncodedFormEntity.new(params, encoding)
  post
end
Get =
Request.create_type do |uri_builder, path, params, encoding|
  query_string = URLEncodedUtils.format(params, encoding)
  get = HttpGet.new(uri_builder.create_uri(path, query_string))
  get
end
Delete =
Request.create_type do |uri_builder, path|
  HttpDelete.new(uri_builder.create_uri(path))
end
Put =
Request.create_type do |uri_builder, path|
  HttpPut.new(uri_builder.create_uri(path))
end