diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/BaseRequestHandler.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseRequestHandler.cs b/OpenSim/Framework/Servers/BaseRequestHandler.cs new file mode 100644 index 0000000..b357763 --- /dev/null +++ b/OpenSim/Framework/Servers/BaseRequestHandler.cs | |||
@@ -0,0 +1,35 @@ | |||
1 | namespace OpenSim.Framework.Servers | ||
2 | { | ||
3 | public class BaseRequestHandler | ||
4 | { | ||
5 | public virtual string ContentType | ||
6 | { | ||
7 | get { return "application/xml"; } | ||
8 | } | ||
9 | |||
10 | private readonly string m_httpMethod; | ||
11 | |||
12 | public virtual string HttpMethod | ||
13 | { | ||
14 | get { return m_httpMethod; } | ||
15 | } | ||
16 | |||
17 | private readonly string m_path; | ||
18 | |||
19 | protected BaseRequestHandler(string httpMethod, string path) | ||
20 | { | ||
21 | m_httpMethod = httpMethod; | ||
22 | m_path = path; | ||
23 | } | ||
24 | |||
25 | public virtual string Path | ||
26 | { | ||
27 | get { return m_path; } | ||
28 | } | ||
29 | |||
30 | protected string GetParam(string path) | ||
31 | { | ||
32 | return path.Substring(m_path.Length); | ||
33 | } | ||
34 | } | ||
35 | } \ No newline at end of file | ||