1 USING: help.markup help.syntax io.streams.string strings
3 IN: http.server.responses
6 { $values { "body" "a response body" } { "content-type" string } { "response" response } }
7 { $description "Creates a successful HTTP response which sends a response body with the specified content type to the client." } ;
9 HELP: <trivial-response>
10 { $values { "code" integer } { "message" string } { "response" response } }
11 { $description "Creates an HTTP error response." }
14 "USE: http.server.responses"
15 "415 \"Unsupported Media Type\" <trivial-response>"
19 ARTICLE: "http.server.responses" "Canned HTTP responses"
20 "The " { $vocab-link "http.server.responses" } " vocabulary provides constructors for a few useful " { $link response } " objects."
28 "New error responses like the above can be created for other error codes too:"
29 { $subsections <trivial-response> } ;
31 ABOUT: "http.server.responses"