Loading…

Prompt missing parameters

Table of contents on this page
The parameter submission methods of all interfaces of apifm are: **application/x-www-form-urlencoded, do not use JSON format to submit parameters** The interface returns JSON structured data You have passed the parameters and it still prompts you that the parameters are missing. Then you must have passed the parameters in json or directly in BODY. ### WeChat Mini Program Development API request interface description of the mini program: [https://developers.weixin.qq.com/miniprogram/dev/api/wx.request.html](https://developers.weixin.qq.com/miniprogram/dev/api/wx.request.html) _For data with POST method and header['content-type'] is application/x-www-form-urlencoded, the data will be converted into query string_ ```javascript wx.request({ url: 'test.php', // This is only an example, not the real interface address data: { x: '', y: '' }, header: { 'content-type': 'application/x-www-form-urlencoded' }, success(res) { console.log(res.data) } }) ``` For mini program development, it is recommended to directly use the WeChat Mini ProgramSDK of apifm: [https://github.com/gooking/apifm-wxapi](https://github.com/gooking/apifm-wxapi) ### Ajax web development Set request header 'content-type': 'application/x-www-form-urlencoded'