Skip to content

Commit 58cb1c1

Browse files
author
Greg Bowler
committed
Update example POST request
1 parent d61a9c5 commit 58cb1c1

File tree

6 files changed

+86
-96
lines changed

6 files changed

+86
-96
lines changed

composer.lock

Lines changed: 69 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/01-basic-fetch.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use Gt\Fetch\Http;
55
use Gt\Fetch\Response\BodyResponse;
6+
use Gt\Fetch\Response\Json;
67

78
/*
89
* This example fetches the list of repositories in the PhpGt organisation from
@@ -19,7 +20,7 @@
1920

2021
return $response->json();
2122
})
22-
->then(function($json) {
23+
->then(function(Json $json) {
2324
// $json is a pre-decoded object. Expected response is an array of Repositories,
2425
// as per https://developer.github.com/v3/repos/#list-organization-repositories
2526
echo "PHP.Gt repository list:" . PHP_EOL;

0 commit comments

Comments
 (0)