mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
14 lines
396 B
TypeScript
14 lines
396 B
TypeScript
import isomorphicFetch from 'isomorphic-fetch';
|
|
import { addTask } from './domain-tasks';
|
|
|
|
export function fetch(url: string): Promise<any> {
|
|
// TODO: Find some way to supply the base URL via domain context
|
|
var promise = isomorphicFetch('http://localhost:5000' + url, {
|
|
headers: {
|
|
Connection: 'keep-alive'
|
|
}
|
|
});
|
|
addTask(promise);
|
|
return promise;
|
|
}
|