Adam Cammack
52a181347c
Add an SSL example
2013-03-01 16:43:19 -06:00
Loïc Hoguin
d305527e88
Merge branch 'eventsource_example' of git://github.com/acammack/cowboy
2013-02-16 15:11:56 +01:00
Loïc Hoguin
39af3010cb
Merge branch 'web_server_example' of git://github.com/acammack/cowboy
2013-02-16 14:39:15 +01:00
Adam Cammack
a302fe5007
Add EventSource example
...
Port from extend/cowboy_examples.
2013-02-16 02:26:32 -06:00
Adam Cammack
f112cdf643
Add a web server example
...
Explore re-routing in middleware.
2013-02-16 02:21:54 -06:00
Adam Cammack
a9294e0f50
Improve pastebin example
...
Reject more malicious paths.
2013-02-16 02:13:19 -06:00
Adam Cammack
f9dd3c9e54
Add a REST example that streams its response
2013-02-12 09:44:26 -06:00
Adam Cammack
09f1a8d55b
Add an example with custom middleware
2013-02-09 13:54:08 -06:00
Loïc Hoguin
6549f68d49
Fix examples links
...
Thanks to grass on IRC for the heads up.
2013-02-09 16:05:23 +01:00
Loïc Hoguin
574c3d4900
Improve Websocket example
2013-02-09 15:38:35 +01:00
Loïc Hoguin
efbd913326
Merge branch 'add_rest_example' of git://github.com/acammack/cowboy
2013-02-07 18:37:15 +01:00
Adam Cammack
d7b83db92e
Add a more involved REST example
...
A pastebin type application that can optionally highlight the output as
both text and HTML.
2013-02-07 11:00:26 -06:00
Adam Cammmack
fbdd3af63e
Improve basic_auth example
...
Some web browsers will now prompt for user name and password
2013-02-06 21:06:39 -06:00
Yurii Rashkovskii
b69903435e
Elixir hello world example
2013-02-06 14:08:49 -07:00
Loïc Hoguin
f96e20aef7
Rename example 'static' to 'static_world' to avoid confusion
2013-01-30 22:13:31 +01:00
Loïc Hoguin
cc52343e9b
Merge branch 'websocket-example' of https://github.com/pvieytes/cowboy
2013-01-30 14:57:25 +01:00
Pablo Vieytes
b8a0a8963b
add websocket example
2013-01-30 10:11:39 +01:00
Loïc Hoguin
f710ac86f8
Merge branch 'feature_basic_auth' of https://github.com/ivlis/cowboy
2013-01-29 22:20:59 +01:00
Ivan Lisenkov
54c6d3fa3a
Implement authorization header parsing
...
Basic HTTP authorization according to RFC 2617 is implemented.
Added an example of its usage with REST handler.
2013-01-30 00:30:05 +04:00
Loïc Hoguin
ab0699ab29
Make examples use the new routing
2013-01-29 14:47:17 +01:00
Loïc Hoguin
ca98a86b30
Add HTML5 Video Example to the static example
2013-01-22 17:19:39 +01:00
Loïc Hoguin
647e95aed1
Replace terminate/2 with terminate/3, adding a Reason
...
This should have been done a *long* time ago, back when I initially
added Websocket support. This is the first part of two in improving
loop handler support with regards to socket closure.
Reason may include: {normal, shutdown} for the most normal shutdown,
{normal, timeout} for a loop handler timeout shutdown, or {error, _}
if an error occured.
2013-01-22 02:34:18 +01:00
Loïc Hoguin
82de4254dd
Make cowboy_req:has_body/1 return boolean()
...
This makes it similar to the other has_* functions.
2013-01-19 17:20:35 +01:00
Loïc Hoguin
01f57ad65d
Add optional automatic response body compression
...
This behavior can be enabled with the `compress` protocol option.
See the `compress_response` example for more details.
All tests are now ran with and without compression for both HTTP
and HTTPS.
2013-01-07 22:42:16 +01:00
Unix1
33461ecdbd
Fix examples to follow new env tuple standard
...
This brings examples in line with the recent Middleware change.
2013-01-05 19:19:14 -08:00
Loïc Hoguin
a07d063fd8
Add cookie example
2012-12-20 14:40:22 +01:00
Loïc Hoguin
1851032482
Improve Markdown for the examples README
2012-12-14 10:50:26 +01:00
Loïc Hoguin
db6b1596ae
Make a few more missing headers lowercase
2012-12-05 13:43:25 +01:00
Loïc Hoguin
160063497c
Start crypto also in the examples and documentation
2012-10-11 20:52:29 +02:00
Loïc Hoguin
7b3d9943a9
Merge branch 'dbmercer-patch-1' of git://github.com/dbmercer/cowboy.git
2012-10-11 20:48:29 +02:00
dbmercer
b5fdf02af0
Modified static example to send appropriate MIME type
...
Modified the static example in the examples subdirectory
to use the mimetypes application to determine the appropriate
MIME type to send down the wire in the HTTP headers of the reply.
2012-10-11 20:47:35 +02:00
Loïc Hoguin
642a8f73c9
Fix Vary header, was wrongly named Variances previously
2012-10-11 20:44:53 +02:00
Josh Toft
958c4f7283
Fixing relative links
2012-10-01 16:05:54 -07:00
Josh Toft
e7a66b9c1e
Add rest_hello_world link to examples README
2012-10-01 13:21:45 -07:00
Josh Toft
855828d15c
Make example README's more thorough
2012-10-01 10:37:24 -07:00
Loïc Hoguin
8497c8bbcd
Don't use decode_packet/3 for parsing the request-line
...
First step in making all methods and header names binaries to
get rid of many inconsistencies caused by decode_packet/3.
Methods are all binary now. Note that since they are case
sensitive, the usual methods become <<"GET">>, <<"POST">> and so on.
2012-09-21 08:54:57 +02:00
Loïc Hoguin
8d5f8db90a
Improve consistency of return types for cowboy_req API
...
The signature of parse_header, body_qs, multipart_data and
the set_resp_* functions has changed.
See the cowboy_req module edoc for more details.
2012-09-17 13:56:58 +02:00
Loïc Hoguin
f39c001c03
Rename cowboy_http_static to cowboy_static
2012-08-27 13:53:27 +02:00
Loïc Hoguin
6d84afd16d
Rename cowboy_http_rest to cowboy_rest
2012-08-27 13:39:59 +02:00
Loïc Hoguin
d3dcaf109b
Rename cowboy_http_req to cowboy_req
2012-08-27 13:28:57 +02:00
Loïc Hoguin
e4124de2c7
Switch to Ranch for connection handling
...
This is the first of many API incompatible changes.
You have been warned.
2012-08-27 11:50:35 +02:00
Loïc Hoguin
f212cafad2
Add a REST Hello World example
2012-07-22 05:09:56 +02:00
Loïc Hoguin
6ea32d605d
Add a Chunked Hello World example
2012-07-22 05:09:56 +02:00
Loïc Hoguin
73c07376bb
Add a POST echo example
2012-07-22 05:09:56 +02:00
Loïc Hoguin
370b3d9648
Add a GET echo example
2012-07-22 05:09:56 +02:00
Loïc Hoguin
86f9f481c8
Add a simple Static File Server example
2012-07-14 20:24:47 +02:00
Loïc Hoguin
b8a25b156c
Add an Hello World example
2012-07-13 10:15:22 +02:00
Loïc Hoguin
9baf3e2ae9
Add an examples/ directory containing a link to cowboy_examples
2012-02-20 08:42:45 +01:00