Function
buildUrl
(dataAPI: string, params?: object)
Source from the content-addressed store, hash-verified
| 16 | } |
| 17 | |
| 18 | export function buildUrl(dataAPI: string, params?: object): string { |
| 19 | const paramStr = serialize(params); |
| 20 | if (paramStr) { |
| 21 | return dataAPI.indexOf('?') > 0 ? `${dataAPI}&${paramStr}` : `${dataAPI}?${paramStr}`; |
| 22 | } |
| 23 | return dataAPI; |
| 24 | } |
| 25 | |
| 26 | export function get(dataAPI: string, params?: object, headers?: object, otherProps?: object): Promise<any> { |
| 27 | const fetchHeaders = { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…