swift-fetch

v1.4.5 • by Ava Sharma

A modern, promise-based HTTP client for Swalang, inspired by fetch.

Installation

$ swalang install swift-fetch

Documentation

Swift Fetch

An isomorphic HTTP client for the browser and server-side Swalang.

Usage

import swiftFetch from 'swift-fetch';

async func getUser(id) {
  let response = await swiftFetch.get(`/api/users/${id}`);
  return response.json();
}