Skip to content

Commit

Permalink
Merge pull request yiisoft#8412 from davidsonalencar/master
Browse files Browse the repository at this point in the history
docs/guide/runtime-requests.md - fixed comment [ci skip]
  • Loading branch information
samdark committed May 14, 2015
2 parents d7fe0e1 + d9df4b5 commit f0a4dc3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/guide/runtime-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ For example,
```php
$request = Yii::$app->request;

if ($request->isAjax) { // the request is an AJAX request }
if ($request->isGet) { // the request method is GET }
if ($request->isPost) { // the request method is POST }
if ($request->isPut) { // the request method is PUT }
if ($request->isAjax) { /* the request is an AJAX request */ }
if ($request->isGet) { /* the request method is GET */ }
if ($request->isPost) { /* the request method is POST */ }
if ($request->isPut) { /* the request method is PUT */ }
```

## Request URLs <span id="request-urls"></span>
Expand Down Expand Up @@ -105,7 +105,7 @@ $headers = Yii::$app->request->headers;
// returns the Accept header value
$accept = $headers->get('Accept');

if ($headers->has('User-Agent')) { // there is User-Agent header }
if ($headers->has('User-Agent')) { /* there is User-Agent header */ }
```

The `request` component also provides support for quickly accessing some commonly used headers, including:
Expand Down

0 comments on commit f0a4dc3

Please sign in to comment.