• Stars
    star
    694
  • Rank 62,624 (Top 2 %)
  • Language
    Ruby
  • Created over 14 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby.

httpclient - HTTP accessing library. Gem Version

Copyright (C) 2000-2015 NAKAMURA, Hiroshi [email protected].

'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby. 'httpclient' formerly known as 'http-access2'.

See HTTPClient for documentation.

Features

  • methods like GET/HEAD/POST/* via HTTP/1.1.
  • HTTPS(SSL), Cookies, proxy, authentication(Digest, NTLM, Basic), etc.
  • asynchronous HTTP request, streaming HTTP request.
  • debug mode CLI.
  • by contrast with net/http in standard distribution;
    • Cookies support
    • MT-safe
    • streaming POST (POST with File/IO)
    • Digest auth
    • Negotiate/NTLM auth for WWW-Authenticate (requires net/ntlm module; rubyntlm gem)
    • NTLM auth for Proxy-Authenticate (requires 'win32/sspi' module; rubysspi gem)
    • extensible with filter interface
    • you don't have to care HTTP/1.1 persistent connection (httpclient cares instead of you)
  • Not supported now
    • Cache
    • Rather advanced HTTP/1.1 usage such as Range, deflate, etc. (of course you can set it in header by yourself)

httpclient command

Usage: 1) httpclient get https://www.google.co.jp/?q=ruby
Usage: 2) httpclient

For 1) it issues a GET request to the given URI and shows the wiredump and the parsed result. For 2) it invokes irb shell with the binding that has a HTTPClient as 'self'. You can call HTTPClient instance methods like;

get "https://www.google.co.jp/", :q => :ruby

Author

License

This program is copyrighted free software by NAKAMURA, Hiroshi. You can redistribute it and/or modify it under the same terms of Ruby's license; either the dual license version in 2003, or any later version.

httpclient/session.rb is based on http-access.rb in http-access/0.0.4. Some part of it is copyrighted by Maebashi-san who made and published http-access/0.0.4. http-access/0.0.4 did not include license notice but when I asked Maebashi-san he agreed that I can redistribute it under the same terms of Ruby. Many thanks to Maebashi-san.

Install

You can install httpclient via rubygems: gem install httpclient

Usage

See HTTPClient for documentation. You can also check sample/howto.rb how to use APIs.

Bug report or Feature request

Please file a ticket at the project web site.

  1. find a similar ticket from https://github.com/nahi/httpclient/issues
  2. create a new ticket by clicking 'Create Issue' button.
  3. you can use github features such as pull-request if you like.

Changes

See ChangeLog

More Repositories

1

avl_tree

AVL tree and Red-black tree in Ruby
Ruby
65
star
2

webrick

*MOVED* -> https://github.com/nahi/ruby/tree/webrick_trunk
Ruby
16
star
3

ruby-crypt

Ruby
14
star
4

logger

Lightweight logging utility for Ruby
Ruby
14
star
5

f2p

a web-based FriendFeed app for mobile
Ruby
12
star
6

siphash-java-inline

SipHash implementation with hand inlining the SIPROUND
Java
12
star
7

radix_tree

Naive implementation of Radix Tree for Ruby
Ruby
8
star
8

soap4r

Ruby
6
star
9

odrk-http-client

THIS REPO IS DEPRECATED: Moved to https://github.com/asakusarb/odrk-http-client
Ruby
6
star
10

spkihash

Public key fingerprint calculator for Chrome
Ruby
6
star
11

ff_dump

retrieves FriendFeed entries via FriendFeed API and dumps it to files
Ruby
4
star
12

bouncy-castle-java

Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" at http://www.bouncycastle.org/java.html
Ruby
4
star
13

openpgp4u

Ruby
3
star
14

pkcs1

PKCS#1 Ruby implementation. OAEP and PSS. For production, use OpenSSL instead.
Ruby
3
star
15

javaone2012-benchmark

Ruby
3
star
16

examples

Samples for JJUG JRuby session at 22 Feb. 2011
Ruby
2
star
17

krypt-openssl

Ruby
2
star
18

jruby-pki.appspot.com

GAE/J application servied at http://jruby-pki.appspot.com/
Ruby
2
star
19

llplanets-em-examples

Example sources prepared for LL Planets presentation
Ruby
2
star
20

lambda-sandbox

Java
2
star
21

jba

JBA file format handler
Ruby
1
star
22

jruby-ossl-ext

JRuby-OSSL extension
Java
1
star
23

text

1
star
24

socket_proxy

Creates I/O pipes for TCP socket tunneling
Ruby
1
star
25

autoload-sandbox

autoload sandbox scripts
Ruby
1
star
26

pkcs12

PKCS#12 scanning library
Ruby
1
star
27

RBTreeMap

Java
1
star
28

kinoboards

Kinoboards Is Network Opened BOARD System
Perl
1
star
29

ff_foaf_graph

Creates FOAF graph on FriendFeed
Ruby
1
star
30

jsr292-sandbox

Java
1
star