@nevermined-io/sdk - v3.0.44 / WebServiceConnector
Provides a common interface to web services.
• new WebServiceConnector(config
): WebServiceConnector
Name | Type |
---|---|
config |
InstantiableConfig |
src/nevermined/utils/WebServiceConnector.ts:26
• config: InstantiableConfig
src/nevermined/utils/WebServiceConnector.ts:24
▸ _sleep(ms
): Promise
<unknown
>
Name | Type |
---|---|
ms |
number |
Promise
<unknown
>
src/nevermined/utils/WebServiceConnector.ts:238
▸ delete(url
, payload?
, headers?
): Promise
<Response
>
Name | Type |
---|---|
url |
string |
payload? |
BodyInit |
headers |
Object |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:71
▸ downloadFile(url
, destination?
, index?
, headers?
): Promise
<string
>
Name | Type |
---|---|
url |
string |
destination? |
string |
index? |
number |
headers? |
Object |
Promise
<string
>
src/nevermined/utils/WebServiceConnector.ts:86
▸ downloadUrl(url
, headers?
): Promise
<string
>
Name | Type |
---|---|
url |
string |
headers? |
any |
Promise
<string
>
src/nevermined/utils/WebServiceConnector.ts:139
▸ fetch(url
, opts
, numberTries?
): Promise
<Response
>
Name | Type | Default value |
---|---|---|
url |
any |
undefined |
opts |
RequestInit |
undefined |
numberTries |
number |
1 |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:221
▸ fetchCID(cid
): Promise
<string
>
Name | Type |
---|---|
cid |
string |
Promise
<string
>
src/nevermined/utils/WebServiceConnector.ts:193
▸ fetchToken(url
, grantToken
, numberTries?
, apiKeyHash?
): Promise
<Response
>
Name | Type | Default value |
---|---|---|
url |
string |
undefined |
grantToken |
string |
undefined |
numberTries |
number |
1 |
apiKeyHash? |
string |
undefined |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:165
▸ get(url
, headers?
): Promise
<Response
>
Name | Type |
---|---|
url |
any |
headers |
Object |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:47
▸ getFileResponse(url
, index?
, headers?
): Promise
<{ name
: string
; response
: Response
}>
Name | Type |
---|---|
url |
string |
index? |
number |
headers? |
Object |
Promise
<{ name
: string
; response
: Response
}>
src/nevermined/utils/WebServiceConnector.ts:113
▸ post(url
, payload
, headers?
): Promise
<Response
>
Name | Type |
---|---|
url |
string |
payload |
BodyInit |
headers |
Object |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:32
▸ put(url
, payload
, headers?
): Promise
<Response
>
Name | Type |
---|---|
url |
string |
payload |
BodyInit |
headers |
Object |
Promise
<Response
>
src/nevermined/utils/WebServiceConnector.ts:56
▸ uploadFile(url
, data
, encrypt?
): Promise
<any
>
Name | Type |
---|---|
url |
string |
data |
ReadStream |
encrypt? |
boolean |
Promise
<any
>
src/nevermined/utils/WebServiceConnector.ts:156
▸ uploadMessage(url
, data
, encrypt?
): Promise
<any
>
Name | Type |
---|---|
url |
string |
data |
string |
encrypt? |
boolean |
Promise
<any
>
src/nevermined/utils/WebServiceConnector.ts:147
▸ getIPFSAuthToken(): undefined
| string
undefined
| string