Git Product home page Git Product logo

h2get's Introduction

Travis CI Status Build Status

Ruby API

H2 object

H2.new

Creates a new H2 object

H2.connect(url)

Connects to a URL (only https is implemented currently)

H2.send_prefix()

Sends the HTTP/2 connection prefix

H2.send_settings([[key, value],...])

Sends an SETTINGS frame

H2.send_settings_ack()

Sends a SETTINGS frame with the ack flag

H2.send_priority(stream_id, dependent_stream_id, exclusive_flag, weight)

Send a PRIORITY frame

H2.send_window_update(sid, increment)

Send a WINDOW_UPDATE frame

H2.send_ping()

Sends a PING frame

H2.send_headers({headers}, stream_id, flags, priority)

Sends a HEADER frame

H2.send_data(stream_id, flags, data)

Sends a DATA frame

H2.read(timeout_ms)

Reads a Frame, or times out. Returns nil on timeout

Frame object

Frame.type

Returns a string representation of the frame type

Frame.type_num

Returns a numeric representation of the frame type

Frame.to_s

Returns a text representation of a frame

Frame.flags

Returns the frame flags field

Frame.len

Returns the length of the frame's payload

Frame.is_end_stream

Returns true if the END_STREAM flag is set

Frame.stream_id

Returns the length of the frame's stream_id

Frame.ack()

For types that support it (PING, SETTINGS) send a ack frame

Priority object

Priority.new(dependent_sid, exclusive, weight)

Creates a new priority object (to be used with H2.send_headers)

h2get's People

Contributors

acasademont avatar deweerdt avatar jbenoist avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.