Skip to content

System bridge: Fetch API → native HTTP client #15

@wangnaihe

Description

@wangnaihe

Module

w3cos-runtime (new module: bridge/fetch.rs)

Description

Implement the W3C Fetch API as a system bridge, mapping to a native HTTP client (e.g. reqwest or ureq). This enables W3C OS apps to make network requests.

Acceptance Criteria

  • fetch(url) compiles to a native HTTP GET request
  • Support GET, POST, PUT, DELETE methods
  • Support JSON request/response bodies
  • Support custom headers
  • Async execution (non-blocking UI)
  • Error handling (network errors, timeouts)
  • Parser/codegen support for fetch() calls in TSX

Difficulty

Medium — HTTP client is straightforward, async integration with the event loop is the challenge.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions