changed hex_metadata.config
 
@@ -20,4 +20,4 @@
20
20
[{<<"app">>,<<"lfe">>},
21
21
{<<"optional">>,false},
22
22
{<<"requirement">>,<<"2.0.1">>}]}]}.
23
- {<<"version">>,<<"0.3.0">>}.
23
+ {<<"version">>,<<"0.3.1">>}.
changed src/barista-passthrough.lfe
 
@@ -21,4 +21,4 @@
21
21
(body "hej!\r\n"))
22
22
(lfe_io:format "headers: ~p~n" `(,headers))
23
23
(lfe_io:format "body: ~p~n~n" `(,body))
24
- (barista-resposne:proceed 200 headers body))))
24
+ (barista:response 200 headers body))))
changed src/barista-response.lfe
 
@@ -1,9 +1,6 @@
1
- (defmodule barista-resposne
1
+ (defmodule barista-response
2
2
(export all))
3
3
4
- (defun proceed (status headers body)
5
- `#(proceed (,(response 200 headers body))))
6
-
7
4
(defun response (body)
8
5
(response 200 body))
9
6
 
@@ -11,40 +8,42 @@
11
8
(response status '() body))
12
9
13
10
(defun response (status headers body)
14
- `#(response #(,status ,(string:join (++ headers (list body)) "\r\n"))))
11
+ `#(proceed
12
+ #(response
13
+ #(,status ,(string:join (++ headers (list body)) "\r\n")))))
15
14
16
15
(defun accepted ()
17
- (accepted #"Accepted"))
16
+ (accepted "Accepted"))
18
17
19
18
(defun accepted (body)
20
19
(response 202 body))
21
20
22
21
(defun created ()
23
- (created #"Created"))
22
+ (created "Created"))
24
23
25
24
(defun created (body)
26
25
(response 201 body))
27
26
28
27
(defun ok ()
29
- (ok #"OK"))
28
+ (ok "OK"))
30
29
31
30
(defun ok (body)
32
31
(response 200 body))
33
32
34
33
(defun method-not-allowed ()
35
- (method-not-allowed #"Method Not Allowed"))
34
+ (method-not-allowed "Method Not Allowed"))
36
35
37
36
(defun method-not-allowed (body)
38
37
(response 405 body))
39
38
40
39
(defun no-content ()
41
- (no-content #"No Content"))
40
+ (no-content "No Content"))
42
41
43
42
(defun no-content (body)
44
43
(response 204 body))
45
44
46
45
(defun not-found ()
47
- (not-found #"Not Found"))
46
+ (not-found "Not Found"))
48
47
49
48
(defun not-found (body)
50
49
(response 404 body))
changed src/barista.app.src
 
@@ -1,6 +1,6 @@
1
1
{application,barista,
2
2
[{description,"Hot lmugs of LFE for your simple HTTP needs"},
3
- {vsn,"0.3.0"},
3
+ {vsn,"0.3.1"},
4
4
{modules,[barista,'barista-lmug','barista-options',
5
5
'barista-util']},
6
6
{registered,[]},
changed src/barista.lfe
 
@@ -31,9 +31,9 @@
31
31
('undefined '())
32
32
(opts opts)))))
33
33
34
- (defun response (body) (barista-resposne:response body))
35
- (defun response (status body) (barista-resposne:response status body))
36
- (defun response (status headers body) (barista-resposne:response status headers body))
34
+ (defun response (body) (barista-response:response body))
35
+ (defun response (status body) (barista-response:response status body))
36
+ (defun response (status headers body) (barista-response:response status headers body))
37
37
38
38
(defun start ()
39
39
(start '()))