Ignore:
Timestamp:
Aug 6, 2022, 11:32:32 PM (2 years ago)
Author:
alloc
Message:

Big refactoring in Web to pass around a Context instead of a bunch of individual arguments all the time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/Web/API/GetServerInfo.cs

    r383 r387  
    11using System;
    22using AllocsFixes.JSON;
    3 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
    4 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
    53
    64namespace AllocsFixes.NetConnections.Servers.Web.API {
    7         public class GetServerInfo : WebAPI {
    8                 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
    9                         int _permissionLevel) {
     5        public class GetServerInfo : AbsWebAPI {
     6                public override void HandleRequest (RequestContext _context) {
    107                        JSONObject serverInfo = new JSONObject ();
    118
     
    4340
    4441
    45                         WriteJSON (_resp, serverInfo);
     42                        WebUtils.WriteJson (_context.Response, serverInfo);
    4643                }
    4744        }
Note: See TracChangeset for help on using the changeset viewer.