git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
2f5e2be
Branches
Tags
develop-client_server
master
typescript
fs-words.git
server
lib
plankton
http
logic-decl.d.ts
[mod] server:lib:plankton
Christian Fraß
commited
2f5e2be
at 2021-03-12 22:01:27
logic-decl.d.ts
Blame
History
Raw
declare module lib_http { /** * @author fenris <frass@greenscale.de> */ enum enum_method { get = "get", post = "post", options = "options" } /** * @author fenris <frass@greenscale.de> */ type type_request = { host: string; query: string; method: enum_method; headers: { [name: string]: string; }; body: string; }; /** * @author fenris <frass@greenscale.de> */ type type_response = { statuscode: int; headers: { [name: string]: string; }; body: string; }; } declare module lib_http { /** * @author fenris <frass@greenscale.de> */ function encode_request(request: type_request): string; /** * @author fenris <frass@greenscale.de> */ function decode_request(request_raw: string): type_request; /** * @author fenris <frass@greenscale.de> */ function encode_response(response: type_response): string; /** * @author fenris <frass@greenscale.de> */ function decode_response(response_raw: string): type_response; } declare module lib_http { /** * @author fenris */ class class_http_request implements lib_code.interface_code<type_request, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: type_request): string; /** * @implementation * @author fenris */ decode(x: string): type_request; } /** * @author fenris */ class class_http_response implements lib_code.interface_code<type_response, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: type_response): string; /** * @implementation * @author fenris */ decode(x: string): type_response; } } declare module lib_http { }