“LlHTTPResponse”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: llHTTPResponse( key request_id, integer status, string bod…”) |
|||
| 第13行: | 第13行: | ||
*This call must be made by the script containing the http_request event where the request_id was received. | *This call must be made by the script containing the http_request event where the request_id was received. | ||
*除了脚本大小之外,这个函数可以发送的数据量没有限制。 | *除了脚本大小之外,这个函数可以发送的数据量没有限制。 | ||
| − | + | 在接收脚本时,llhttprequest 可以截断响应长度。在使用它们进行 prim-to-prim 通信时要注意。 | |
*默认的响应是“ content-type: text/plain”。使用 llsetcontenttype 可以选择返回不同的类型,如“ text/html”。 | *默认的响应是“ content-type: text/plain”。使用 llsetcontenttype 可以选择返回不同的类型,如“ text/html”。 | ||
|示例= | |示例= | ||
2020年8月20日 (四) 10:09的版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: llHTTPResponse( key request_id, integer status, string body ); |
| 参数:
key request_id – A valid HTTP request key. integer status – HTTP Status (200, 400, 404, etc) string body – Contents of the response. |
| 返回值:用 status 和 body 响应 request _ id。 |
| 注意事项 |
|---|
*This call must be made by the script containing the http_request event where the request_id was received.
在接收脚本时,llhttprequest 可以截断响应长度。在使用它们进行 prim-to-prim 通信时要注意。
|
| 示例 |
|---|
示例一
string url;
default
{
changed(integer change)
{
if (change & (CHANGED_REGION_START
|
| 相关函数 |
|---|
| llGetFreeURLs llRequestURL llRequestSecureURL llReleaseURL llGetHTTPHeader llSetConteneType |
| 相关事件 |
|---|
| http request http response |