Method: HTTP.get

Defined in:
lib/opal/jquery/http.rb

.get(url, options = {}) {|self| ... } ⇒ Promise?

Create a HTTP get request.

Examples:

HTTP.get("/foo") do |req|
  puts "got data: #{req.data}"
end

Parameters:

  • url (String)

    url for request

  • options (Hash) (defaults to: {})

    any request options

Yields:

  • (self)

    optional block to handle response

Returns:

  • (Promise, nil)

    optionally returns a promise



# File 'lib/opal/jquery/http.rb', line 95