(method: string, url: string, body?: any)
| 5 | import { RestApiHandler, RPCApiHandler } from '../../src/api'; |
| 6 | |
| 7 | function makeRequest(method: string, url: string, body?: any): Request { |
| 8 | const payload = body ? JSON.stringify(body) : undefined; |
| 9 | return new Request(url, { method, body: payload }); |
| 10 | } |
| 11 | |
| 12 | async function unmarshal(response: Response): Promise<any> { |
| 13 | const text = await response.text(); |