diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-03-02 20:10:16 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-03-02 20:10:16 +0300 |
commit | 9d0fb8156d6122730c6007393d49a6d76a114c60 (patch) | |
tree | 4aff03474026772b7a0debb60d5a6f3bc5fd0beb /examples/cookie.c | |
parent | c65fdedc7bedfc20da73cdbfc34c22bb80139896 (diff) | |
download | magi-9d0fb8156d6122730c6007393d49a6d76a114c60.tar magi-9d0fb8156d6122730c6007393d49a6d76a114c60.tar.xz magi-9d0fb8156d6122730c6007393d49a6d76a114c60.zip |
[magi]
Diffstat (limited to 'examples/cookie.c')
-rw-r--r-- | examples/cookie.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/cookie.c b/examples/cookie.c index 5bbade1..7c55ba8 100644 --- a/examples/cookie.c +++ b/examples/cookie.c @@ -4,7 +4,7 @@ void list_cookies(magi_request *r) { magi_cookies *current; - magi_response_add(r, "Cookies:"); + magi_response(r, "Cookies:"); for (current = r->cookies; current; current = current->next) { magi_cookie *c = ¤t->item; magi_response_format(r, "<br/>[%s] = [%s]", c->name, c->data); @@ -14,14 +14,14 @@ void list_cookies(magi_request *r) void response(magi_request *r) { magi_response_cookie(r, "cookie", "monster"); - magi_response_add(r, + magi_response(r, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' " "'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>" "<html xmlns='http://www.w3.org/1999/xhtml'>" "<head><title>Cookie Listing and Setting</title></head>" "<body><p>"); list_cookies(r); - magi_response_add(r, "</p></body></html>"); + magi_response(r, "</p></body></html>"); } int main(int argc, char const *argv[]) |