Updated Writing the handlers (markdown)
This commit is contained in:
@@ -4,7 +4,17 @@ Now you have to implement each handler. You need to inherit from WSF_SKELETON_HA
|
|||||||
|
|
||||||
## Implementing the routines declared directly in WSF_SKELETON_HANDLER
|
## Implementing the routines declared directly in WSF_SKELETON_HANDLER
|
||||||
|
|
||||||
TODO
|
### is_chunking
|
||||||
|
|
||||||
|
HTTP/1.1 supports streaming responses (and providing you have configured your server to use a proxy server in WSF_PROXY_USE_POLICY, this framework guarantees you have an HTTP/1.1 client to deal with). It is up to you whether or not you choose to make use of it. If so, then you have to serve the response one chunk at a time (but you could generate it all at once, and slice it up as you go). In this routine you just say whether or not you will be doing this. So the framework n=knows which other routines to call.
|
||||||
|
|
||||||
|
## includes_response_entity
|
||||||
|
|
||||||
|
The response to a DELETE, PUT or POST will include HTTP headers. It may or may not include a body. It is up to you, and this is where you tell the framework.
|
||||||
|
|
||||||
|
## conneg
|
||||||
|
|
||||||
|
[The HTTP/1.1 specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html#sec12.1) defines server-driven content negotiation. Based on the Accept* headers in the request, we can determine whether we have a format for the response entity that is acceptable to the client. You need to indicate what formats you support. The framework does the rest. Normally you will have the same options for all requests, in which case you can use a once object.
|
||||||
|
|
||||||
## Implementing the policies
|
## Implementing the policies
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user