Proposal for "HTTP_Request"

» Metadata » Status
  • Status: Proposed
» Description

A library for sending HTTP requests from the server side. For example:


<?php

// in this case we use a configuration object
$config = new HttpRequestConfig();
$config->setOption("follow_location", true);
$config->setOption("user_agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36");
$config->setContentTypeOption("charset", "iso-8859-1");

// sends a POST request to mysite.com and attaches some files
$req = new HttpRequestPost($config);
$req->setParam("action", "upload-image");
$req->setFormParam("image", new HttpRequestFormFile("/path/to/image.jpg"));
echo $req->send("http://www.mysite.com");
?>
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2015-01-09
  • Proposal: 2015-01-09
  • Call for Votes: 1970-01-01
  • Voting Extended: 1970-01-01