Changeset 325 for binary-improvements/MapRendering/Web/API/WebAPI.cs
- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/API/WebAPI.cs
r309 r325 1 using System;2 1 using System.Net; 3 2 using System.Text; 3 using AllocsFixes.JSON; 4 4 5 namespace AllocsFixes.NetConnections.Servers.Web.API 6 { 7 public abstract class WebAPI 8 { 9 public static void WriteJSON (HttpListenerResponse resp, JSON.JSONNode root) 10 { 5 namespace AllocsFixes.NetConnections.Servers.Web.API { 6 public abstract class WebAPI { 7 public static void WriteJSON (HttpListenerResponse resp, JSONNode root) { 11 8 StringBuilder sb = new StringBuilder (); 12 9 root.ToString (sb); … … 18 15 } 19 16 20 public static void WriteText (HttpListenerResponse _resp, string _text) 21 { 17 public static void WriteText (HttpListenerResponse _resp, string _text) { 22 18 byte[] buf = Encoding.UTF8.GetBytes (_text); 23 19 _resp.ContentLength64 = buf.Length; … … 27 23 } 28 24 29 public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel); 25 public abstract void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, 26 int permissionLevel); 30 27 31 28 public virtual int DefaultPermissionLevel () { … … 34 31 } 35 32 } 36
Note:
See TracChangeset
for help on using the changeset viewer.