Changeset 471 for TFP-WebServer
- Timestamp:
- Aug 21, 2023, 1:32:40 PM (16 months ago)
- Location:
- TFP-WebServer/WebServer/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/WebServer/src/RequestContext.cs
r426 r471 1 using System.Collections.Specialized; 1 2 using SpaceWizards.HttpListener; 2 3 … … 6 7 public readonly ERequestMethod Method; 7 8 public readonly HttpListenerRequest Request; 9 private NameValueCollection queryParameters; 8 10 public readonly HttpListenerResponse Response; 9 11 public readonly WebConnection Connection; 10 12 public readonly int PermissionLevel; 13 14 public NameValueCollection QueryParameters => queryParameters ??= Request.QueryString; 11 15 12 16 public RequestContext (string _requestPath, HttpListenerRequest _request, HttpListenerResponse _response, WebConnection _connection, int _permissionLevel) { -
TFP-WebServer/WebServer/src/WebAPI/APIs/Log.openapi.yaml
r467 r471 87 87 88 88 paths: 89 /api/ Log:89 /api/log: 90 90 get: 91 91 tags: -
TFP-WebServer/WebServer/src/WebAPI/APIs/LogApi.cs
r467 r471 23 23 24 24 protected override void HandleRestGet (RequestContext _context) { 25 if (_context. Request.QueryString ["count"] == null || !int.TryParse (_context.Request.QueryString["count"], out int count)) {25 if (_context.QueryParameters ["count"] == null || !int.TryParse (_context.QueryParameters ["count"], out int count)) { 26 26 count = 50; 27 27 } … … 39 39 } 40 40 41 if (_context. Request.QueryString ["firstLine"] == null || !int.TryParse (_context.Request.QueryString["firstLine"], out int firstLine)) {41 if (_context.QueryParameters ["firstLine"] == null || !int.TryParse (_context.QueryParameters ["firstLine"], out int firstLine)) { 42 42 firstLine = count > 0 ? LogBuffer.Instance.OldestLine : LogBuffer.Instance.LatestLine; 43 43 }
Note:
See TracChangeset
for help on using the changeset viewer.