Skip to content

Commit

Permalink
Specify why to use new Network APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
pihart committed Mar 17, 2021
1 parent 3043080 commit c703ec3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export class Network {
/**
* Makes a network request to a resource and returns its data parsed as JSON
*
* Use instead of `window.fetch` because it rejects failed transactions.
*
* @return The result of the request to the resource, parsed as JSON, if it is `ok`
* @throws [[`ResourceNotFoundException`]] if not `ok`
*/
Expand All @@ -123,7 +125,7 @@ export class Network {
/**
* Makes a network request
*
* `window.fetch` but with error checking
* Use instead of `window.fetch` because it rejects failed transactions.
*
* @return The result of `window.fetch`, if it is `ok`
* @throws [[`ResourceNotFoundException`]] if not `ok`
Expand Down

0 comments on commit c703ec3

Please sign in to comment.