Skip to content

Commit f31ce37

Browse files
author
Ahmad Nassri
committed
updating all tests and docs to mockbins.com
1 parent 530905c commit f31ce37

File tree

2 files changed

+115
-148
lines changed

2 files changed

+115
-148
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ So you're probably wondering how using Unirest makes creating requests in PHP ea
8181
$headers = array("Accept" => "application/json");
8282
$body = array("foo" => "hellow", "bar" => "world");
8383

84-
$response = Unirest\Request::post("http://httpbin.org/post", $headers, $body);
84+
$response = Unirest\Request::post("http://mockbin.com/request", $headers, $body);
8585

8686
$response->code; // HTTP Status code
8787
$response->headers; // Headers
@@ -97,7 +97,7 @@ To upload files in a multipart form representation use the return value of `Unir
9797
$headers = array("Accept" => "application/json");
9898
$body = array("file" => Unirest\File::add("/tmp/file.txt"));
9999

100-
$response = Unirest\Request::post("http://httpbin.org/post", $headers, $body);
100+
$response = Unirest\Request::post("http://mockbin.com/request", $headers, $body);
101101
```
102102

103103
### Custom Entity Body
@@ -107,7 +107,7 @@ Sending a custom body such as a JSON Object rather than a string or form style p
107107
$headers = array("Accept" => "application/json");
108108
$body = json_encode(array("foo" => "hellow", "bar" => "world"));
109109

110-
$response = Unirest\Request::post("http://httpbin.org/post", $headers, $body);
110+
$response = Unirest\Request::post("http://mockbin.com/request", $headers, $body);
111111
```
112112

113113
### Authentication
@@ -151,7 +151,7 @@ Unirest\Request::proxyAuth('username', 'password', CURLAUTH_DIGEST);
151151
Previous versions of **Unirest** support *Basic Authentication* by providing the `username` and `password` arguments:
152152

153153
```php
154-
$response = Unirest\Request::get("http://httpbin.org/get", null, null, "username", "password");
154+
$response = Unirest\Request::get("http://mockbin.com/request", null, null, "username", "password");
155155
```
156156

157157
**This has been deprecated, and will be completely removed in `v.3.0.0` please use the `Unirest\Request::auth()` method instead**
@@ -194,7 +194,7 @@ You can set some advanced configuration to tune Unirest-PHP:
194194
#### Custom JSON Decode Flags
195195

196196
Unirest uses PHP's [JSON Extension](http://php.net/manual/en/book.json.php) for automatically decoding JSON responses.
197-
sometime you may want to return associative arrays, limit the depth of recursion, or use any of the [customization flags](http://php.net/manual/en/json.constants.php#constant.json-hex-tag).
197+
sometime you may want to return associative arrays, limit the depth of recursion, or use any of the [customization flags](http://php.net/manual/en/json.constants.php).
198198

199199
To do so, simply set the desired options using the `jsonOpts` request method:
200200

0 commit comments

Comments
 (0)