fetch-sse
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -6,4 +6,4 @@ "use strict"; | ||
const utils_1 = require("./utils"); | ||
const sse = new sse_1.SSEDecoder(); | ||
async function fetchEventData(url, options = {}) { | ||
const sse = new sse_1.SSEDecoder(); | ||
const { method, data, headers = {}, signal, onMessage, onError, onOpen, onClose } = options; | ||
@@ -10,0 +10,0 @@ const defaultHeaders = { |
{ | ||
"name": "fetch-sse", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "An easy API for making Event Source requests, with all the features of fetch(), Supports browsers and node.", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
@@ -5,4 +5,4 @@ import { IFetchOptions } from './interface'; | ||
const sse = new SSEDecoder(); | ||
export async function fetchEventData(url: string, options: IFetchOptions = {}): Promise<void> { | ||
const sse = new SSEDecoder(); | ||
const { method, data, headers = {}, signal, onMessage, onError, onOpen, onClose } = options; | ||
@@ -9,0 +9,0 @@ const defaultHeaders = { |
25807