To use the Codeigniter framework to write the backend of WeChat
Some interfaces of WeChat need to use http requests. Does Codeigniter have special classes?
like
Get access token:
http request method: GET
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
Create QR code:
http request method: POST
URL: https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN
POST data format: json
POST data example: {"expire_seconds": 1800, "action_name": "QR_SCENE", "action_info": {"scene": {"scene_id": 123}}}
我想大声告诉你2017-05-16 16:45:41
Isn’t it convenient to use curl to send requests? Why do we need to write a special class?
天蓬老师2017-05-16 16:45:41
Recommend a class library for CI Curl request, github address: codeigniter-curl