UNPKG

@zeppos/zml

Version:

A Mini Library of ZeppOS MiniApp

19 lines (16 loc) 418 B
const logger = Logger.getLogger('test-message-fetch') export const fetchModule = { async onRunFetch() { logger.log('fetchTest run') }, async testGetHtml2() { const result = await this.fetch({ method: 'get', url: 'https://bible-api.com/john%203:17', }).catch((e) => { console.log('test fetch=>', e) }) logger.log('test api', result.body) return result.body.text }, }