function example_http_request in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/tests/old/samples/example.module \example_http_request()
File
- coder_upgrade/
tests/ old/ samples/ example.module, line 149
Code
function example_http_request() {
// drupal_http_request() -- Change the next line but leave this alone
drupal_http_request('http://example.com/', array(
'Header-Title' => 'value',
), 'GET', NULL, 0);
/*
* Trying to produce this:
* drupal_http_request('http://example.com/', array('headers' => array('Header-Title' => 'value'), 'max_redirects' => 0));
*/
drupal_http_request('http://example.com/', array(
'Header-Title' => 'value',
), 'GET', 'Some data', 0);
drupal_http_request('http://example.com/', array(
'Header-Title' => 'value',
), 'POST', 'Some data', 3);
drupal_http_request('http://example.com/', array(
'Header-Title' => 'value',
), 'POST', 'Some data');
drupal_http_request('http://example.com/', array(
'Header-Title' => 'value',
), 'POST');
drupal_http_request('http://example.com/');
}