How to add the WeChat API to a Swift project?

See @chengsam’s answer for newer updates to this process. How to use the WeChat SDK in your Swift project The official WeChat developer English instructions seem to be out of date and incomplete. The Chinese instructions are better but only deal with Objective-C. The steps below show how to add the WeChat (weixin 微信) SDK … Read more

Upload Image using POST form data in Python-requests

From wechat api doc: curl -F [email protected] “http://file.api.wechat.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE” Translate the command above to python: import requests url=”http://file.api.wechat.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE” files = {‘media’: open(‘test.jpg’, ‘rb’)} requests.post(url, files=files) Doc: https://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file