0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Minor grammar improvements from Derek Brown

[ci-skip]
This commit is contained in:
Loïc Hoguin 2016-01-15 16:14:46 +01:00
parent 6deac75ea4
commit dbb636034f
3 changed files with 11 additions and 11 deletions

View file

@ -8,7 +8,7 @@ It is meant to be usable as a step by step guide.
=== The service === The service
Can the service become unavailable, and when it does, can 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 may be detected early. We may also have planned outages
of all or parts of the system. Implement the of all or parts of the system. Implement the
`service_available` callback. `service_available` callback.
@ -31,7 +31,7 @@ the same handler.
Skip this section if you are not doing a collection. 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 if you use the route `/users` for the collection of
users then the collection is hardcoded; if you use users then the collection is hardcoded; if you use
`/forums/:category` for the collection of threads `/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 being authorized? A simple example of that is censorship
of a resource. Implement the `forbidden` callback. of a resource. Implement the `forbidden` callback.
Is there any constraints on the length of the resource URI? 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 For example, the URI may be used as a key in storage and may
have a limit in length. Implement `uri_too_long`. have a limit in length. Implement `uri_too_long`.
=== Representations === Representations
@ -132,7 +132,7 @@ What media types do I provide? If text based, what charsets
are provided? What languages do I provide? are provided? What languages do I provide?
Implement the mandatory `content_types_provided`. Prefix 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`. or `to_text`.
Implement the `languages_provided` or `charsets_provided` Implement the `languages_provided` or `charsets_provided`
@ -153,7 +153,7 @@ the `multiple_choices` callback.
=== Redirections === Redirections
Do I need to keep track of what resources were deleted? 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. resource leaves a redirect link to its new location.
Implement the `previously_existed` callback. 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, you must implement the `content_types_accepted` callback,
and one `AcceptResource` callback for each content-type and one `AcceptResource` callback for each content-type
it returns. Prefix the `AcceptResource` callback names 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`. `from_json`.
Do we want to allow the POST method to create individual Do we want to allow the POST method to create individual

View file

@ -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. 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 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 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 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 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 For example, we may only want the representation returned if
it is more recent than the one we have in cache. Similarly, it is more recent than the one we have in cache. Similarly,
we may want to instruct the client about how it should cache we may want to instruct the client about how it should cache
the representation. This isn't restricted to caching. We may the representation. This isn't restricted to caching. We may,
for example want to store a new representation of a resource for example, want to store a new representation of a resource
only if it wasn't modified since we first retrieved it. only if it wasn't modified since we first retrieved it.
The data format of a representation is also known as the media The data format of a representation is also known as the media

View file

@ -146,7 +146,7 @@ what the method is with `cowboy_req:method/1` and return a
different list for each methods. different list for each methods.
The `AcceptResource` value is the name of the callback that will 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 Value type:: true | {true, URL} | false
Default behavior:: Crash if undefined. Default behavior:: Crash if undefined.