📝 docs(tsl): sync api skill with corrected codegen
Mirror docs/tsl/codegen into the bundled tsl-api-reference skill and rebuild the function index. Remove invalid duplicate API entries for cb_delistedbydate, createhttpsession, exportJsonString, and Anova_Bartlett so exact lookup returns the canonical entries.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 运行时 / 网络与HTTP
|
||||
|
||||
### `appendHttpHeader(session, header)`
|
||||
## `appendHttpHeader(session, header)`
|
||||
|
||||
向指定会话中添加请求头信息
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `clearHttpHeader(session)`
|
||||
## `clearHttpHeader(session)`
|
||||
|
||||
清除会话中的请求头信息
|
||||
|
||||
@@ -21,17 +21,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `createhttpsession(return_value)`
|
||||
|
||||
创建一个http Session对象,并返回会话ID,即Session id。仅新一代TSL语言支持该函数。
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------------- | ---- | -------------- |
|
||||
| `return_value` | int | 返回session ID |
|
||||
|
||||
返回:intptr
|
||||
|
||||
### `destroyHttpSession(session, return_value)`
|
||||
## `destroyHttpSession(session, return_value)`
|
||||
|
||||
销毁一个Http Session对象,并返回销毁结果,销毁成功返回True。 仅新一代TSL语言支持该函数。
|
||||
|
||||
@@ -42,7 +32,7 @@
|
||||
|
||||
返回:bool
|
||||
|
||||
### `getHttp(session, url, time_out, value, code)`
|
||||
## `getHttp(session, url, time_out, value, code)`
|
||||
|
||||
网络访问以及相关函数相关函数。
|
||||
|
||||
@@ -56,7 +46,7 @@
|
||||
|
||||
返回:bool
|
||||
|
||||
### `getHttpContent(session, frompos, return_value)`
|
||||
## `getHttpContent(session, frompos, return_value)`
|
||||
|
||||
获得HTTP返回的具体内容,可以从frompos开始取,缺省是取全部。 这个可以方便在progress回调函数中实现文件的临时存贮,亦可以动态打印内容。 仅新一代TSL语言支持该函数。
|
||||
|
||||
@@ -68,7 +58,7 @@
|
||||
|
||||
返回:string
|
||||
|
||||
### `getHttpCookies(session)`
|
||||
## `getHttpCookies(session)`
|
||||
|
||||
获取指定会话、来自服务器设置的Cookies信息
|
||||
|
||||
@@ -78,7 +68,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `getHttpResponseHeader(session, return_value)`
|
||||
## `getHttpResponseHeader(session, return_value)`
|
||||
|
||||
获得HTTP返回的头信息,可以在header回调中看全部合成的header,也可以从已经完成会话的时候获得会话的头部信息。
|
||||
|
||||
@@ -89,7 +79,7 @@
|
||||
|
||||
返回:string
|
||||
|
||||
### `internetRequest(session, url, refer, header, post_data, user_name, pass_word, result_type, response_code, time_out)`
|
||||
## `internetRequest(session, url, refer, header, post_data, user_name, pass_word, result_type, response_code, time_out)`
|
||||
|
||||
发送Internet访问请求,主要用于Web建立网站。
|
||||
|
||||
@@ -108,7 +98,7 @@
|
||||
|
||||
返回:bool
|
||||
|
||||
### `postHttp(session, url, content, time_out, value, code)`
|
||||
## `postHttp(session, url, content, time_out, value, code)`
|
||||
|
||||
以POST方式从指定的HTTP URL获得内容。
|
||||
|
||||
@@ -123,7 +113,7 @@
|
||||
|
||||
返回:bool
|
||||
|
||||
### `setHttpAuth(session, user_name, pass_word, _type)`
|
||||
## `setHttpAuth(session, user_name, pass_word, _type)`
|
||||
|
||||
设置指定会话中认证信息
|
||||
|
||||
@@ -132,11 +122,11 @@
|
||||
| `session` | any | Session ID |
|
||||
| `user_name` | string | 用户名 |
|
||||
| `pass_word` | string | 密码 |
|
||||
| `_type` | any | 可选参数,认证信息类型;可多次调用以设置不同类型的认证信息: |
|
||||
| `_type` | any | 可选参数,认证信息类型;可多次调用以设置不同类型的认证信息: |
|
||||
|
||||
返回:any
|
||||
|
||||
### `setHttpCallBack(session, callback, t, return_value)`
|
||||
## `setHttpCallBack(session, callback, t, return_value)`
|
||||
|
||||
设置http回调,缺省回调模式是progress模式,可以通过t设定为"header"设置头部回调函数。仅新一代TSL语言支持该函数。
|
||||
|
||||
@@ -149,7 +139,7 @@
|
||||
|
||||
返回:回调函数的返回值为0表示继续,非0则结束请求
|
||||
|
||||
### `setHttpCookies(session, cookies)`
|
||||
## `setHttpCookies(session, cookies)`
|
||||
|
||||
设置指定会话中Cookies信息
|
||||
|
||||
@@ -160,7 +150,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `setHttpMode(session, mode, return_value)`
|
||||
## `setHttpMode(session, mode, return_value)`
|
||||
|
||||
设置chunked模式(分段模式),主要用于大模型类的一个请求分段输出模式,支持类似于大模型一样按单词吐词输出。仅新一代TSL语言支持该函数。
|
||||
|
||||
@@ -172,7 +162,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `setHttpProxy(session, proxy_addr, proxy_type)`
|
||||
## `setHttpProxy(session, proxy_addr, proxy_type)`
|
||||
|
||||
设置指定会话中代理信息
|
||||
|
||||
@@ -184,7 +174,7 @@
|
||||
|
||||
返回:any
|
||||
|
||||
### `setHttpVerifySsl(session, verify)`
|
||||
## `setHttpVerifySsl(session, verify)`
|
||||
|
||||
设置指定会话是否校验服务器证书
|
||||
|
||||
@@ -197,17 +187,17 @@
|
||||
|
||||
## URL 内容函数
|
||||
|
||||
### `urlToText(a_src)`
|
||||
## `urlToText(a_src)`
|
||||
|
||||
将URL标准格式的串转化为文本字符串
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ------ | ---------- |
|
||||
| `a_src` | string | 字符串类型 |
|
||||
|
||||
返回:string
|
||||
|
||||
#### 示例
|
||||
### 示例
|
||||
|
||||
```tsl
|
||||
a_src := "%23abcd%20%2010";
|
||||
|
||||
Reference in New Issue
Block a user