Skip to content

Commit

Permalink
Merge pull request #9 from CMProductions/small-readme-fix
Browse files Browse the repository at this point in the history
small readme fixes
  • Loading branch information
Hilari Moragrega authored May 25, 2017
2 parents c4787e2 + 5896f84 commit 37b717e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ my_users_api:
timeout: 2
requests:
list_users:
url: /users
path: /users
options:
timeout: 15
get_user:
url: /users/${USER_ID}
path: /users/${USER_ID}
create_user:
url: /users/${USER_ID}
path: /users/${USER_ID}
headers:
- Content-Type: application/json
method: POST
Expand Down Expand Up @@ -241,7 +241,7 @@ $client = $builder->build();
#### Building a service client
To build a service client specify the name of the service when building the client in the last step of the builder
```php
$myServiceApi = $builder->builder('my_service');
$myServiceApi = $builder->build('my_service');
```

#### Customizing the builds
Expand Down Expand Up @@ -286,10 +286,10 @@ $builder->withConsoleDebug();
### Creating a request
To create a request you need to identify the service and the request that you want. Additionally you can pass dynamic values to substitute placeholders
```php
$request = $client->create('weather', 'forecast', ['city' => $city]);
$request = $client->request('weather', 'forecast', ['city' => $city]);

// Service specific clients do not need the service name
$request = $weather->create('forecast', ['city' => $city]);
$request = $weather->request('forecast', ['city' => $city]);
```

The requests created are `Cmp\Http\Message\Request` intances, implementing `Psr\Http\Message\RequestInterface`, making them suitable to share between libraries and frameworks
Expand Down

0 comments on commit 37b717e

Please sign in to comment.