How can I call a local INTERFACE IN A applet?
Background:
As the mini-program started beta testing, we also got the AppID, so we started a trip to the mini-program.
As there are already a lot of tutorials on small programs from mastering to getting started on the internet, I will not repeat them. I just want to talk about them. during the development process, how to use the local (Development Environment) interface.
Because the development document of the applet is written,Wx. requestThe URL in can only be an https request. Generally, there is no https -.-
So we use the Charles proxy to implement the requirement.
Prerequisites:
I think you already have the following conditions:
0. Permission for applet Development
1. Know what the trusted domain name configured in the background of your applet is -.-
2. There is a Mac (Haha... ignore... From Mac... Windows party please wait)
Preparations:
First, we need to install the following two software:
0. Install Charles. Of course, it is a cracked version-.-The method of cracking should be Baidu by yourself.
1. Install web Developer Tools
Procedure:
In this step, I think you have installed the above two software and can run properly.
0. First open Charles,Help-> SSL Proxying-> Install Charles Root CertificateInstall the certificate locally
1. Search for the Charles keyword in the key string access, find the certificate, click it, and select trustAlways trust
2. OpenTools-> Map RemoteAdd mappings between online domain names and local (Development Environment) Services
3. OpenProxy-> Proxy Settings
4. Select the Proxies tab. The default HTTP Proxy value is 8888. Remember this port number, which will be used later in the web Developer tool.
5. Select the Mac OS X tab and click Enable the following two options:
6. OpenProxy-> Mac OS X ProxyEnable local proxy service
7. At this time, Charles has completed the local service proxy online service step, and then some settings in the web Developer Tool
8. After scanning the logon code, click the proxy option in the upper-right corner.
9. Select manually set proxy, then enter the local IP address, and the proxy port number set in Charles at the front side (step 1)
10. click Save and go to the project of the applet. directly fill in the online domain name in the request, save and run, you will find that Charles has received some requests from your local