romanpitak / php-rest-client Goto Github PK
View Code? Open in Web Editor NEWPHP REST client library.
License: MIT License
PHP REST client library.
License: MIT License
Thank you for your excellent work. In the Readme, you should probably specify in the example:
$client = new RestClient\Client('https://raw.githubusercontent.com/romanpitak');
instead of:
$client = new Client('https://raw.githubusercontent.com/romanpitak');
If you use composer to pull out and install dependencies, the simple new Client()
call won't work. Thanks
In Request::buildResponse(), preprocess the post data in self::DATA_KEY before assigning them to $curlOptions[CURLOPT_POSTFIELDS]. Check if it's an array etc.
Hi, Roman,
I was thrilled to find your PHP-REST-Client package, but wondering if there was a method for setting custom headers? For example, I need to make a request to an API that wants a token to verify authentication. Can "x-access-token" or any other header value be set before requests are fired off?
Update: Nevermind. I did what I SHOULD have done and looked through your classes. I'm seeing the $headers option in newRequest().
PHP-REST-Client/src/Response.php
Line 159 in 728b6c4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.