Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
httprl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
drupal.org
httprl
Commits
7823ef13
Commit
7823ef13
authored
Feb 24, 2012
by
mikeytown2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #1455528 by mikeytown2: Add readme.
parent
e9641ea1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
3 deletions
+89
-3
README.txt
README.txt
+85
-0
httprl.install
httprl.install
+1
-0
httprl.module
httprl.module
+3
-3
No files found.
README.txt
0 → 100644
View file @
7823ef13
------------------------------------
HTTP PARALLEL REQUEST LIBRARY MODULE
------------------------------------
CONTENTS OF THIS FILE
---------------------
* About HTTPRL
* Requirements
* Configuration
* API Overview
* Technical Details
ABOUT HTTPRL
------------
http://drupal.org/project/httprl
HTTPRL is a flexible and powerful HTTP client implementation. Correctly handles
GET, POST, PUT or any other HTTP requests & the sending of data. Issue blocking
or non-blocking requests in parallel. Set timeouts, max simultaneous connection
limits, chunk size, and max redirects to follow. Can handle data with
content-encoding and transfer-encoding headers set. Correctly follows
redirects. Option to forward the referrer when a redirect is found. Cookie
extraction and parsing into key value pairs.
REQUIREMENTS
------------
Requires PHP 5. The following functions must be available on the server:
* stream_socket_client
* stream_select
* stream_set_blocking
* stream_get_meta_data
* stream_socket_get_name
Some hosting providers disable these functions; but they do come standard with
PHP 5.
CONFIGURATION
-------------
Settings page is located at:
6.x: admin/settings/httprl
7.x: admin/config/development/httprl
* IP Address to send all self server requests to. If left blank it will use the
same server as the request. If set to -1 it will use the host name instead of
an IP address. This controls the output of httprl_build_url_self().
API OVERVIEW
------------
Issue HTTP Requests:
httprl_build_url_self()
- Helper function to build an URL for asynchronous requests to self.
httprl_request()
- Queue up a HTTP request in httprl_send_request().
httprl_send_request()
- Perform many HTTP requests.
Other Functions:
httprl_background_processing()
- Output text, close connection, continue processing in the background.
httprl_strlen()
- Get the length of a string in bytes.
httprl_glue_url()
- Alt to http_build_url().
httprl_get_server_schema()
- Return the server schema (http or https).
TECHNICAL DETAILS
-----------------
Using stream_select() HTTPRL will send http requests out in parallel. These
requests can be made in a blocking or non-blocking way. Blocking will wait for
the http response; Non-Blocking will close the connection not waiting for the
response back. The API for httprl is similar to the Drupal 7 version of
drupal_http_request().
httprl.install
View file @
7823ef13
...
@@ -44,6 +44,7 @@ function httprl_requirements($phase) {
...
@@ -44,6 +44,7 @@ function httprl_requirements($phase) {
'stream_select'
,
'stream_select'
,
'stream_set_blocking'
,
'stream_set_blocking'
,
'stream_get_meta_data'
,
'stream_get_meta_data'
,
'stream_socket_get_name'
,
);
);
// Check each function to make sure it exists.
// Check each function to make sure it exists.
foreach
(
$function_list
as
$function_name
)
{
foreach
(
$function_list
as
$function_name
)
{
...
...
httprl.module
View file @
7823ef13
...
@@ -174,7 +174,7 @@ function httprl_build_url_self($path = '', $detect_schema = FALSE) {
...
@@ -174,7 +174,7 @@ function httprl_build_url_self($path = '', $detect_schema = FALSE) {
}
}
/**
/**
*
Perform an HTTP request
*
Queue up a HTTP request in httprl_send_request().
*
*
* @see drupal_http_request()
* @see drupal_http_request()
*
*
...
@@ -434,7 +434,7 @@ function httprl_request($url, $options = array()) {
...
@@ -434,7 +434,7 @@ function httprl_request($url, $options = array()) {
}
}
/**
/**
* Perform
an HTTP request
.
* Perform
many HTTP requests
.
*
*
* @see drupal_http_request()
* @see drupal_http_request()
*
*
...
@@ -1126,7 +1126,7 @@ function httprl_background_processing($output, $wait = TRUE, $content_type = "te
...
@@ -1126,7 +1126,7 @@ function httprl_background_processing($output, $wait = TRUE, $content_type = "te
}
}
/**
/**
* Get the length of a string in bytes
* Get the length of a string in bytes
.
*
*
* @param $string
* @param $string
* get string length
* get string length
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment