From 0d528e1d226283fa9acfafbd60b8a7461f509a85 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 31 Oct 2007 12:45:03 +0000 Subject: * Added a streamhandler that does streams both in and out * The RestDeserialisehandler now does streams and returns an object instead of string --- OpenSim/Framework/Servers/BaseRequestHandler.cs | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 OpenSim/Framework/Servers/BaseRequestHandler.cs (limited to 'OpenSim/Framework/Servers/BaseRequestHandler.cs') 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 @@ +namespace OpenSim.Framework.Servers +{ + public class BaseRequestHandler + { + public virtual string ContentType + { + get { return "application/xml"; } + } + + private readonly string m_httpMethod; + + public virtual string HttpMethod + { + get { return m_httpMethod; } + } + + private readonly string m_path; + + protected BaseRequestHandler(string httpMethod, string path) + { + m_httpMethod = httpMethod; + m_path = path; + } + + public virtual string Path + { + get { return m_path; } + } + + protected string GetParam(string path) + { + return path.Substring(m_path.Length); + } + } +} \ No newline at end of file -- cgit v1.1