Before starting, it is recommended to take a moment to read this instruction
This library is specially developed for PowerBuilder applications. After testing, it is applicable to PB versions 8 – 2019.
1、JSON The user-friendly json for PB is seamlessly connected with datawindow/datasore. It can dynamically create dw/ds to import data, or match and import existing dw/ds by column. Real time import and export of json is fast and efficient. uo_ There are mainly four json function functions, namely:
2、HttpClient After developing PBJson, I suddenly feel that HttpClient has become an inevitable need. This is the HttpClient. Because I didn't use HttpClient much before, I didn't have enough experience, and my shortcomings are inevitable. Excuse me! HttpClient uses WinHttp API internally:
It is simple to use. There is only one parameter, Request, to complete the request. For parameter description, see uo_ Statement in httpclient Local External Functions
With the help of pbjson, it can work perfectly with json and datawindow. 3.uo Httpclient has a built-in variable uo Response response is used to record various response results and data.
Learn about the request category first //Static variable, the first parameter nHttpType of the require function constant int HttpGet = 1 constant int HttpPost = 2 constant int HttpPut = 3
It is necessary to know in advance what will be returned after the httpclient sends the request. String header//Save the response header of the httpclient String headerlist []//Save the response header keyword of httpclient Blob data//Save the result of the httpclient, which is not limited to text, but may also be other binary data. In the case of text only, you can take the text value Int errcode//The returned value is incorrect string errtext//The returned value error text Int httpcode//200 normal, 404 501 string verb //POST ,PUT ,GET 。。。 Long timeout=5000//The default timeout is 5 seconds String charset//Language code utf-8 gbk, etc String ContentType//text/html application/json, etc String Server//Server type String text//Text, converted from data. Automatically convert various types of utf8, GBK, UNICODE to the current text code. In most cases, this text is available. However, it does not rule out that the response result is non text, such as binary data such as pictures and sounds. You must read the data to obtain the correct result. uo_ Json json//When Content Type: application/json is returned, this json object will be generated 3、Encryption, decryption and encoding It provides RSA, AES, DES, signature, base64, CRC, urlencode, etc.
4、 In the future, other functions will be added to the library to facilitate PB application. Stay tuned.
5、About being reported as anti-virus software by 360 Some DLLs developed by myself are often reported as viruses or trojans by 360. Here, I solemnly guarantee that I will never write malicious code in DLL! To solve the 360 virus, you can compress the DLL into a zip file and submit it to the https://open.soft.360.cn/report.php testing. After passing the test, 360 will no longer report the virus.
6、Special instructions 1) The copyright is mine, which is certain. 2) DLL is free of charge. 3) Individual modules need development authorization. But it is not absolute. Even if there is no development authorization, the most important thing is to pop up a dialog box when testing. After compiling, it will not pop up, but only pop up the development environment.
大自在(QQ:781770213 group:624409252)
2020/03/06