Skip to content

Networking API #2

@lilrosalyn

Description

@lilrosalyn

The networking API would require the implementation of some extra classes (such as buffers and streams). I'd like for it to support TCP, WebSockets, and HTTP/S.

some basic examples for potential implementation:

response = http.get("https://example.com/")
  .headers({ Authorization: "key" })
  .send()
// <during request/response>
// The main thread isn't necessarily blocked here. I'd like for MiniScript
// to make the request off-thread, then join back to the main thread and
// resume execution of the program. This allows the user not to worry about
// any issues with threading.
print(response.text()) // -> string
print(response.json()) // -> dict | array
print(response.statusCode) // -> number

more to be established later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions