日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

PB中打开url链接

發布時間:2023/12/19 综合教程 78 生活家
生活随笔 收集整理的這篇文章主要介紹了 PB中打开url链接 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

公司項目中,第三方發來個說明,說是要通過打開url連接地址的方式,將參數傳給對方的平臺,參數的封裝采用Json格式,

百度了一通,看了網友們的方法,發現pb中有個inet控件可以實現功能,我開始想,應該是將參數傳給對方以后,對方同

樣將返回值以json的格式傳給我們,所以,用戶不需要看到url打開的頁面,所以需要使用的是GetURL方法,并獲取返回值,

于是有了以下的方法

/*先建立一個nuo_cst_internet.sru對象,來獲取返回值*/
forward
global type nuo_cst_internet from internetresult
end type
end forward

global type nuo_cst_internet from internetresult
end type
global nuo_cst_internet nuo_cst_internet

type variables
string is_data
end variables

forward prototypes
public function integer internetdata (blob data)
end prototypes

public function integer internetdata (blob data);is_data = string(data)
return 1
end function

on nuo_cst_internet.create
call super::create
TriggerEvent( this, "constructor" )
end on

on nuo_cst_internet.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on

以GetURL方法調用url地址

/*uf_get_url
string as_url //封裝好的url地址
return string
*/
string ls_result
integer li_rc 
inet linet_main
nuo_cst_internet luo_data 
linet_main = CREATE inet
luo_data = CREATE nuo_cst_internet
li_rc = linet_main.GetURL(as_url, luo_data)
ls_result = luo_data.is_data

DESTROY luo_data
DESTROY linet_main

RETURN ls_result 

后來發現,對方傳過來的也是一個網頁,然后還需在這個頁面的做提交,于是最后采用了HyperLinkToURL方法,于是不用獲取返回值了

string ls_result
integer li_rc
inet linet_main
linet_main = CREATE inet
li_rc = linet_main.HyperLinkToURL(as_url)
RETURN li_rc

總結

以上是生活随笔為你收集整理的PB中打开url链接的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。