search

Home  >  Q&A  >  body text

WeChat Public Platform - Does Codeigniter have a class to handle http requests?

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}}}

过去多啦不再A梦过去多啦不再A梦2774 days ago549

reply all(3)I'll reply

  • 我想大声告诉你

    我想大声告诉你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?

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 16:45:41

    It doesn’t seem to exist, but you can write one yourself

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 16:45:41

    Recommend a class library for CI Curl request, github address: codeigniter-curl

    reply
    0
  • Cancelreply