Joke Collection Website - Blessing messages - How to get the api interface of the website?
How to get the api interface of the website?
Tools/raw materials
computer
Methods/steps
1, familiar with the concept of API, that is, application programming interface, that is, functions defined in advance during website development, that is, open source functions, but these functions encapsulate some fixed programs and can be called with only one excuse, which is convenient and simple. Just like calling Jquery function.
2, get the interface address to send SMS API interface can be found in the open source code, you can directly go to the open source website to query.
3. Analysis parameters SMS interface is different from other interfaces, and SMS interface can only be opened by local operators. Therefore, the success of interface return does not mean the success of reception, and the specific reception status can only be queried by the operator. In addition, the short message api interface itself does not limit the sending frequency, and the specific sending frequency needs to be set by the user.
4. Call the return value test, write the calling interface in the html file, and test whether the result is called, as shown in the figure, showing the result and failed return parameters.
5.C# Access Interface Enter the following code in the C# program to call the SMS interface; Use the system; Use the system. Assemble. Generics; Use the system. Linq uses the system. Text; usingSystem.Net; Use the system. Io; usingXfrog.Net; Use the system. Diagnosis; Use the system. The Web is as shown in the figure (without demonstrating the creation of C# programs)
6. Declare that every function in the calling space needs to be declared in advance before it can be called. Therefore, at the beginning of the program, the namespace namespace namespace {} must be declared.
7. Defining the calling methods of the request method program are generally Post and Get, so it is necessary to explain what to call, and the difference between Post and Get is not emphasized here.
8. After the request mode is declared by the request function, the request function can be created, including parameters such as sending language and delayed response.
9. After setting the request parameters and related parameters of text conversion, convert the program code into text code, so that the receiver can display the text normally, otherwise it is a piece of code that outsiders can't understand, so the data stream must be converted into a text object.
10. When releasing resources and testing the writer's call, no matter what program it is, it must be released after the call, otherwise it will always occupy resources and consume memory.
- Previous article:How to see the epidemic risk area on the map of Gaode?
- Next article:How to use COVID-19 qualifiers to determine the spatial overlap?
- Related articles
- How to get the password of mobile phone service by texting to 10086?
- Who can help me introduce the official card of ICBC?
- Clean SMS reminder of government departments
- Ten manifestations of a husband not loving his wife
- Will postal express send text messages during the New Year?
- The calling card has been changed. It's no use without arrears. Long time no see. Can I see the short messages sent during this period when I use them?
- How to set OPPO to find X3 information interception?
- Don't use dirty words to hurt people.
- How to open the mobile phone card?
- What number was used to send the SMS verification code of the First Hospital of Jilin University?