[mentioned that ok and friends are similar to return. Added anchors to hello world Jeremy Shaw **20100927184530 Ignore-this: 255b8ef1cb4f7e7106524c3d66afa968 ] hunk ./HelloWorld.lhs 17 -

Hello, World!

+

Hello, World!

hunk ./HelloWorld.lhs 19 -

Your first app!

+

Your first app!

hunk ./HelloWorld.lhs 60 -

How it works

+

How it works

hunk ./HelloWorld.lhs 62 -

Listening for HTTP requests

+

Listening for HTTP requests

hunk ./HelloWorld.lhs 71 -

Configuring the HTTP listener

+

Configuring the HTTP listener

hunk ./HelloWorld.lhs 95 -

Processing a Request

+

Processing a Request

hunk ./HelloWorld.lhs 107 -

Setting the HTTP response code

+

Setting the HTTP response code

hunk ./HelloWorld.lhs 115 -

ok is one of several combinators which can be used to set the HTTP response code. In this case, it will set the response code to 200 OK. Happstack.Server.SimpleHTTP contains similar functions for the common HTTP response codes including, notFound, seeOther, badRequest and more.

+

ok is one of several combinators which can be used to set the HTTP response code. In this case, it will set the response code to 200 OK. Happstack.Server.SimpleHTTP contains similar functions for the common HTTP response codes including, notFound, seeOther, badRequest and more. These functions all act like the normal return function, except they also set the response code.

hunk ./HelloWorld.lhs 117 -

Creating a Response

+

Creating a Response