BadScript 2
Loading...
Searching...
No Matches
BadHttpRequest.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Net;
3
7
9
14{
18 private static readonly BadClassPrototype s_Prototype = new BadNativeClassPrototype<BadHttpContext>("HttpRequest",
19 (_, _) => throw new BadRuntimeException("Cannot create new Http Request")
20 );
21
26 public BadHttpRequest(HttpListenerRequest request)
27 {
28 Request = request;
29 }
30
34 public HttpListenerRequest Request { get; }
35
38 {
39 return s_Prototype;
40 }
41
43 public override string ToSafeString(List<BadObject> done)
44 {
45 return Request.ToString();
46 }
47}
Wrapper for the HttpListenerRequest.
HttpListenerRequest Request
The underlying HttpListenerRequest.
override BadClassPrototype GetPrototype()
override string ToSafeString(List< BadObject > done)
static readonly BadClassPrototype s_Prototype
Class Prototype Instance.
BadHttpRequest(HttpListenerRequest request)
Constructs a new BadHttpRequest.
The Base Class for all BadScript Objects.
Definition BadObject.cs:14
Implements a Class Prototype for the BadScript Language.
Contains Network Hosting Extensions and APIs for the BadScript2 Runtime.
Contains the Error Objects for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10