Skip to content

Commit

Permalink
english docs: CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
maizy committed Oct 27, 2015
1 parent ba2d617 commit c5832a5
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions docs_eng/cors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
Documentation translation for this article is in progress.
See
[machine translation](https://z5h64q92x9.net/proxy_u/ru-en.en/http/hhru.github.io/api/rendered-docs/docs/cors.md) powered by
[Yandex.Translate](https://translate.yandex.com/translate).
# Cross-Origin Resource Sharing (CORS)

API supports the CORS technology for requesting browser data from any domain.
This method is preferable to JSONP. Moreover, unlike JSONP, it is not limited by
the GET method.

To debug requests using CORS, a special URL is available in API: `/cors`. It
supports the HEAD, GET, POST, PUT, DELETE methods. A request with any of these
methods will return the standard response:

```json
{
"method": "GET",
"time": "2013-11-18T13:23:17+0400",
"origin": null,
}
```

| Name | Type | Description |
|--------|--------------|-----------------------------------------------------------|
| method | string | method used in the request (HEAD, GET, POST, PUT, DELETE) |
| time | string | current time |
| origin | string, null | Origin title value in the request, or null |

0 comments on commit c5832a5

Please sign in to comment.