Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tacoberu/http
Simple http client for PHP wrapered Curl extension.
https://github.com/tacoberu/http
Last synced: about 2 months ago
JSON representation
Simple http client for PHP wrapered Curl extension.
- Host: GitHub
- URL: https://github.com/tacoberu/http
- Owner: tacoberu
- License: mit
- Created: 2013-08-10T19:32:08.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-09-08T23:10:50.000Z (over 5 years ago)
- Last Synced: 2023-04-03T14:13:07.064Z (over 1 year ago)
- Language: PHP
- Size: 1.41 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
http
====Status BETA. Don't using!
Simple http client for PHP wrapered Curl extension.
Sample using
------------### Getting data by GET method
$client = new Taco\Http\Client\HttpSession();
$request = $client->createRequest('http://example.org/foo/sample.html');
$response = $request->get();### Sending data by POST method
$client = new Taco\Http\Client\HttpSession();
$request = $client->createRequest('http://example.org/foo/sample.html')
->addGetParam('do', 'signin-submit')
->addPostParam('username', 'test')
->addPostParam('password', 'blabla')
$response = $request->post();### Sending data by PUT method
$client = new Taco\Http\Client\HttpSession();
$response = $client->createRequest('http://example.org/foo/sample.html')
->addGetParam('do', 'signin')
->addPostParam('username', 'test')
->addPostParam('password', 'jhg59n5mbptq56irv5ao48m4s4')
->put();### Delete data by DELETE method
$client = new Taco\Http\Client\HttpSession();
$response = $client->createRequest('http://example.org/foo/sample.html')
->addGetParam('do', 'signin')
->addPostParam('username', 'test')
->addPostParam('password', 'jhg59n5mbptq56irv5ao48m4s4')
->delete();