diff options
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[]) |