diff options
author | Loïc Hoguin <[email protected]> | 2016-01-15 16:14:46 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-01-15 16:16:56 +0100 |
commit | dbb636034f20736e16eb9d6c809217c9525b6cbd (patch) | |
tree | 5d1b9f94d827873f2e7851443fb6c7a6659f2d16 | |
parent | 6deac75ea4f824c4ff9df9e37785592d8d5b5120 (diff) | |
download | cowboy-dbb636034f20736e16eb9d6c809217c9525b6cbd.tar.gz cowboy-dbb636034f20736e16eb9d6c809217c9525b6cbd.tar.bz2 cowboy-dbb636034f20736e16eb9d6c809217c9525b6cbd.zip |
Minor grammar improvements from Derek Brown2.0.0-pre.3
[ci-skip]
-rw-r--r-- | doc/src/guide/resource_design.asciidoc | 14 | ||||
-rw-r--r-- | doc/src/guide/rest_principles.asciidoc | 6 | ||||
-rw-r--r-- | doc/src/manual/cowboy_rest.asciidoc | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/doc/src/guide/resource_design.asciidoc b/doc/src/guide/resource_design.asciidoc index a8a6648..691953f 100644 --- a/doc/src/guide/resource_design.asciidoc +++ b/doc/src/guide/resource_design.asciidoc @@ -8,7 +8,7 @@ It is meant to be usable as a step by step guide. === The service Can the service become unavailable, and when it does, can -we detect it? For example database connectivity problems +we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the `service_available` callback. @@ -31,7 +31,7 @@ the same handler. Skip this section if you are not doing a collection. -Is the collection hardcoded or dynamic? For example +Is the collection hardcoded or dynamic? For example, if you use the route `/users` for the collection of users then the collection is hardcoded; if you use `/forums/:category` for the collection of threads @@ -122,8 +122,8 @@ Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the `forbidden` callback. -Is there any constraints on the length of the resource URI? -For example the URI may be used as a key in storage and may +Are there any constraints on the length of the resource URI? +For example, the URI may be used as a key in storage and may have a limit in length. Implement `uri_too_long`. === Representations @@ -132,7 +132,7 @@ What media types do I provide? If text based, what charsets are provided? What languages do I provide? Implement the mandatory `content_types_provided`. Prefix -the callbacks with `to_` for clarity. For example `to_html` +the callbacks with `to_` for clarity. For example, `to_html` or `to_text`. Implement the `languages_provided` or `charsets_provided` @@ -153,7 +153,7 @@ the `multiple_choices` callback. === Redirections Do I need to keep track of what resources were deleted? -For example you may have a mechanism where moving a +For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the `previously_existed` callback. @@ -196,7 +196,7 @@ If you implement the methods PUT, POST and/or PATCH, you must implement the `content_types_accepted` callback, and one `AcceptResource` callback for each content-type it returns. Prefix the `AcceptResource` callback names -with `from_` for clarity. For example `from_html` or +with `from_` for clarity. For example, `from_html` or `from_json`. Do we want to allow the POST method to create individual diff --git a/doc/src/guide/rest_principles.asciidoc b/doc/src/guide/rest_principles.asciidoc index 6ae2063..66939cb 100644 --- a/doc/src/guide/rest_principles.asciidoc +++ b/doc/src/guide/rest_principles.asciidoc @@ -63,7 +63,7 @@ a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource. A resource is a conceptual mapping to a set of entities. The set of -entities evolves over time; a resource doesn't. For example a resource +entities evolves over time; a resource doesn't. For example, a resource can map to "users who have logged in this past month" and another to "all users". At some point in time they may map to the same set of entities, because all users logged in this past month. But they are @@ -103,8 +103,8 @@ Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache -the representation. This isn't restricted to caching. We may -for example want to store a new representation of a resource +the representation. This isn't restricted to caching. We may, +for example, want to store a new representation of a resource only if it wasn't modified since we first retrieved it. The data format of a representation is also known as the media diff --git a/doc/src/manual/cowboy_rest.asciidoc b/doc/src/manual/cowboy_rest.asciidoc index 6380d41..b504776 100644 --- a/doc/src/manual/cowboy_rest.asciidoc +++ b/doc/src/manual/cowboy_rest.asciidoc @@ -146,7 +146,7 @@ what the method is with `cowboy_req:method/1` and return a different list for each methods. The `AcceptResource` value is the name of the callback that will -be called if the content-type matches. It is defined as follow. +be called if the content-type matches. It is defined as follows. Value type:: true | {true, URL} | false Default behavior:: Crash if undefined. |