https://github.com/peter279k/peter-http
The object-oriented style helper class helps you accessing the HTTP request/response.
https://github.com/peter279k/peter-http
http-client php56 php7
Last synced: about 2 months ago
JSON representation
The object-oriented style helper class helps you accessing the HTTP request/response.
- Host: GitHub
- URL: https://github.com/peter279k/peter-http
- Owner: peter279k
- Created: 2017-09-13T07:42:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T14:00:57.000Z (over 8 years ago)
- Last Synced: 2025-08-23T06:41:08.970Z (7 months ago)
- Topics: http-client, php56, php7
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wp-http
## Introduction
The object-oriented style helper class helps you accessing the HTTP request/response.
## Usage
- ```git clone https://github.com/peter279k/wp-http.git```
- Please see the more details about the ```main.php```.
## Sample code
- Create the ```api-key.ini``` in this project root path and the ini file contents are as follows:
```
[Facebook]
access_token=define_your_access_token
[Rebrandly]
api_key=define_your_api_key
```
- We use the [Facebook graph API](https://developers.facebook.com/) and [Rebrandly](https://developers.rebrandly.com/docs) API to complete the ```GET``` and ```POST``` examples.
- Please see the ```main.php``` to get the more details about ```GET``` and ```POST``` examples.
## References
Here is the references about the WordPress HTTP API.
- [wp_remote_get](https://codex.wordpress.org/Function_Reference/wp_remote_get)
- [wp_remote_post](https://codex.wordpress.org/Function_Reference/wp_remote_post)
- [wp_remote_request](https://developer.wordpress.org/reference/functions/wp_remote_request)
And in our helper class, we use the ```wp_remote_get``` and ```wp_remote_post``` to complete this project.
## How to solve the curl(60):SSL certificate problem
## TODO
Include the more available CURL options.