mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Added a streamhandler that does streams both in and out
* The RestDeserialisehandler now does streams and returns an object instead of string
This commit is contained in:
35
OpenSim/Framework/Servers/BaseRequestHandler.cs
Normal file
35
OpenSim/Framework/Servers/BaseRequestHandler.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user