UNPKG
sdk-lord-of-the-rings
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
```bash npm i sdk-lord-of-the-rings ```
sdk-lord-of-the-rings
/
src
/
network.js
16 lines
(13 loc)
•
300 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict'
;
import
fetch
from
'node-fetch'
;
class
Network
{
static
async
get
(
url, params
) {
try
{
const
result =
await
fetch
(url, params);
return
await
result.
json
(); }
catch
(error) {
throw
error; } } }
export
default
Network
;