Mercurial > projects > ldc
comparison tango/tango/net/http/model/HttpParamsView.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /******************************************************************************* | |
2 | |
3 copyright: Copyright (c) 2004 Kris Bell. All rights reserved | |
4 | |
5 license: BSD style: $(LICENSE) | |
6 | |
7 version: Initial release: April 2004 | |
8 | |
9 author: Kris | |
10 | |
11 *******************************************************************************/ | |
12 | |
13 module tango.net.http.model.HttpParamsView; | |
14 | |
15 private import tango.time.Time; | |
16 | |
17 private import tango.io.model.IBuffer; | |
18 | |
19 private import tango.io.protocol.model.IWriter; | |
20 | |
21 /****************************************************************************** | |
22 | |
23 Maintains a set of query parameters, parsed from an HTTP request. | |
24 Use HttpParams instead for output parameters. | |
25 | |
26 Note that these input params may have been encoded by the user- | |
27 agent. Unfortunately there has been little consensus on what that | |
28 encoding should be (especially regarding GET query-params). With | |
29 luck, that will change to a consistent usage of UTF-8 within the | |
30 near future. | |
31 | |
32 ******************************************************************************/ | |
33 | |
34 interface HttpParamsView : IWritable | |
35 { | |
36 /********************************************************************** | |
37 | |
38 Return the value of the provided header, or null if the | |
39 header does not exist | |
40 | |
41 **********************************************************************/ | |
42 | |
43 char[] get (char[] name, char[] ret = null); | |
44 | |
45 /********************************************************************** | |
46 | |
47 Return the integer value of the provided header, or the | |
48 provided default-value if the header does not exist | |
49 | |
50 **********************************************************************/ | |
51 | |
52 int getInt (char[] name, int ret = -1); | |
53 | |
54 /********************************************************************** | |
55 | |
56 Return the date value of the provided header, or the | |
57 provided default-value if the header does not exist | |
58 | |
59 **********************************************************************/ | |
60 | |
61 Time getDate (char[] name, Time ret = Time.epoch); | |
62 | |
63 /********************************************************************** | |
64 | |
65 Output the param list to the provided consumer | |
66 | |
67 **********************************************************************/ | |
68 | |
69 void produce (void delegate (void[]) consume, char[] eol); | |
70 } |