1 /*******************************************************************************
2 3 Copyright:
4 Copyright (c) 2004 Kris Bell.
5 Some parts copyright (c) 2009-2016 dunnhumby Germany GmbH.
6 All rights reserved.
7 8 License:
9 Tango Dual License: 3-Clause BSD License / Academic Free License v3.0.
10 See LICENSE_TANGO.txt for details.
11 12 Version: Initial release: April 2004
13 14 Authors: Kris
15 16 *******************************************************************************/17 18 moduleocean.net.http.model.HttpParamsView;
19 20 importocean.meta.types.Qualifiers;
21 22 importocean.time.Time;
23 24 /******************************************************************************
25 26 Maintains a set of query parameters, parsed from an HTTP request.
27 Use HttpParams instead for output parameters.
28 29 Note that these input params may have been encoded by the user-
30 agent. Unfortunately there has been little consensus on what that
31 encoding should be (especially regarding GET query-params). With
32 luck, that will change to a consistent usage of UTF-8 within the
33 near future.
34 35 ******************************************************************************/36 37 interfaceHttpParamsView38 {
39 /**********************************************************************
40 41 Return the number of headers
42 43 **********************************************************************/44 45 uintsize ();
46 47 /**********************************************************************
48 49 Return the value of the provided header, or null if the
50 header does not exist
51 52 **********************************************************************/53 54 cstringget (cstringname, cstringret = null);
55 56 /**********************************************************************
57 58 Return the integer value of the provided header, or the
59 provided default-value if the header does not exist
60 61 **********************************************************************/62 63 intgetInt (cstringname, intret = -1);
64 65 /**********************************************************************
66 67 Return the date value of the provided header, or the
68 provided default-value if the header does not exist
69 70 **********************************************************************/71 72 TimegetDate (cstringname, Timeret = Time.epoch);
73 74 /**********************************************************************
75 76 Output the param list to the provided consumer
77 78 **********************************************************************/79 80 voidproduce (scopesize_tdelegate(const(void)[]) consume, cstringeol=null);
81 }