lib/appengine-apis/urlfetch.rb in appengine-apis-0.0.2 vs lib/appengine-apis/urlfetch.rb in appengine-apis-0.0.3
- old
+ new
@@ -23,10 +23,15 @@
# The URLFetch Service provides a way for user code to execute HTTP requests
# to external URLs.
#
# Chunked and hanging requests are not supported, and all content will be
# returned in a single block.
+ #
+ # URLFetch::HTTP also provides a drop-in replacement for Net::HTTP.
+ # To replace the standard implementation throughout your app you can do:
+ # require 'appengine-apis/urlfetch'
+ # Net::HTTP = AppEngine::URLFetch::HTTP
module URLFetch
import com.google.appengine.api.urlfetch.FetchOptions
import com.google.appengine.api.urlfetch.HTTPHeader
import com.google.appengine.api.urlfetch.HTTPMethod
import com.google.appengine.api.urlfetch.HTTPRequest
@@ -42,15 +47,15 @@
# Raised if the response is too large.
class ResponseTooLargeError < StandardError; end
module_function
- #Fetches the given HTTP URL, blocking until the result is returned.
+ # Fetches the given HTTP URL, blocking until the result is returned.
#
# Supported options:
# [:method] GET, POST, HEAD, PUT, or DELETE
# [:payload] POST or PUT payload (implies method is not GET, HEAD,
- # or DELETE)
+ # or DELETE)
# [:headers]
# HTTP headers to send with the request. May be a Hash or
# Net::HTTPHeaders.
# [:allow_truncated]
# if true, truncate large responses and return them
\ No newline at end of file