当前位置: 首页 > news >正文

做pc端网站报价室内装饰公司网站模板

做pc端网站报价,室内装饰公司网站模板,建立一个国外的网站,wordpress 数组0 WinHttp.WinHttpRequest简介 winhttp.winhttprequest是Windows操作系统中的一个API函数#xff0c;用于创建和发送HTTP请求。它可以用于从Web服务器获取数据#xff0c;或将数据发送到Web服务器。该函数提供了许多选项#xff0c;例如设置请求头、设置代理服务器、设置超…0 WinHttp.WinHttpRequest简介 winhttp.winhttprequest是Windows操作系统中的一个API函数用于创建和发送HTTP请求。它可以用于从Web服务器获取数据或将数据发送到Web服务器。该函数提供了许多选项例如设置请求头、设置代理服务器、设置超时时间等。它是一个非常强大的工具可以帮助开发人员轻松地与Web服务器进行通信。 winhttp.winhttprequest.5.1 wihttp.winhttprequest.5.1是一个Microsoft Windows操作系统中的COM组件用于在应用程序中进行HTTP请求和响应。它提供了一种简单的方法来与Web服务器进行通信可以用于发送和接收HTTP请求和响应支持各种HTTP方法如GET、POST、PUT、DELETE等。它还提供了一些其他功能如设置请求头、设置代理服务器、设置超时等。 1 创建PB窗口 为了演示winhttp.winhttprequest的使用创建一PB测试窗口w_restful如下 窗口w_restful代码如下 forward global type w_restful from window end type type mle_resp from multilineedit within w_restful end type type st_3 from statictext within w_restful end type type cb_delete from commandbutton within w_restful end type type cb_put from commandbutton within w_restful end type type cb_post from commandbutton within w_restful end type type cb_get from commandbutton within w_restful end type type sle_data from singlelineedit within w_restful end type type sle_url from singlelineedit within w_restful end type type st_2 from statictext within w_restful end type type st_1 from statictext within w_restful end type end forwardglobal type w_restful from window integer width 3186 integer height 1980 boolean titlebar true string title PB请求RESTful的数据 boolean controlmenu true boolean minbox true boolean maxbox true boolean resizable true long backcolor 67108864 string icon AppIcon! boolean center true mle_resp mle_resp st_3 st_3 cb_delete cb_delete cb_put cb_put cb_post cb_post cb_get cb_get sle_data sle_data sle_url sle_url st_2 st_2 st_1 st_1 end type global w_restful w_restfulforward prototypes public subroutine wf_https (string as_method) end prototypespublic subroutine wf_https (string as_method);string ls_url,ls_data ls_url sle_url.text ls_data sle_data.textstring ls_ret ls_ret gf_https_apex(ls_url,ls_data,as_method)mle_resp.text ls_ret end subroutineon w_restful.create this.mle_respcreate mle_resp this.st_3create st_3 this.cb_deletecreate cb_delete this.cb_putcreate cb_put this.cb_postcreate cb_post this.cb_getcreate cb_get this.sle_datacreate sle_data this.sle_urlcreate sle_url this.st_2create st_2 this.st_1create st_1 this.Control[]{this.mle_resp, this.st_3, this.cb_delete, this.cb_put, this.cb_post, this.cb_get, this.sle_data, this.sle_url, this.st_2, this.st_1} end onon w_restful.destroy destroy(this.mle_resp) destroy(this.st_3) destroy(this.cb_delete) destroy(this.cb_put) destroy(this.cb_post) destroy(this.cb_get) destroy(this.sle_data) destroy(this.sle_url) destroy(this.st_2) destroy(this.st_1) end onevent resize;//窗口控件自动适用long llw , llh llw this.workspacewidth( ) - sle_url.x llh this.workspaceheight( ) - mle_resp.ysle_url.width llwsle_data.width llwmle_resp.width llw mle_resp.height llh end eventtype mle_resp from multilineedit within w_restful integer x 411 integer y 248 integer width 2158 integer height 812 integer taborder 40 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 string text responseText borderstyle borderstyle stylelowered! end typetype st_3 from statictext within w_restful integer x 78 integer y 256 integer width 302 integer height 76 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 long backcolor 67108864 string text Response alignment alignment Right! boolean focusrectangle false end typetype cb_delete from commandbutton within w_restful integer x 14 integer y 784 integer width 375 integer height 116 integer taborder 60 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma string text DELETE end typeevent clicked;//DELETE wf_https(DELETE) end eventtype cb_put from commandbutton within w_restful integer x 14 integer y 648 integer width 375 integer height 116 integer taborder 50 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma string text PUT end typeevent clicked;//PUT wf_https(PUT) end eventtype cb_post from commandbutton within w_restful integer x 14 integer y 512 integer width 375 integer height 116 integer taborder 40 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma string text POST end typeevent clicked;//POST wf_https(POST) end eventtype cb_get from commandbutton within w_restful integer x 14 integer y 376 integer width 375 integer height 116 integer taborder 30 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma string text GET end typeevent clicked;//GET wf_https(GET) end eventtype sle_data from singlelineedit within w_restful integer x 411 integer y 128 integer width 2167 integer height 100 integer taborder 20 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 string text {} borderstyle borderstyle stylelowered! end typetype sle_url from singlelineedit within w_restful integer x 411 integer y 4 integer width 2167 integer height 100 integer taborder 10 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 string text https://apex.oracle.com/pls/apex/blma/b5217/ borderstyle borderstyle stylelowered! end typetype st_2 from statictext within w_restful integer x 137 integer y 136 integer width 242 integer height 76 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 long backcolor 67108864 string text DATA alignment alignment Right! boolean focusrectangle false end typetype st_1 from statictext within w_restful integer x 137 integer y 28 integer width 242 integer height 76 integer textsize -9 integer weight 400 fontcharset fontcharset ansi! fontpitch fontpitch variable! fontfamily fontfamily swiss! string facename Tahoma long textcolor 33554432 long backcolor 67108864 string text URL alignment alignment Right! boolean focusrectangle false end type 2 创建全局函数gf_https_apex() 用来发送请求和获得响应 global type gf_https_apex from function_object end typeforward prototypes global function string gf_https_apex (string as_url, string as_data, string as_method) end prototypesglobal function string gf_https_apex (string as_url, string as_data, string as_method);// 用WinHttp.WinHttpRequest.5.1组件请求https网页和响应/* 调用参数示例 String ls_url,ls_data,ls_response ls_url https://datacenter-web.eastmoney.com/api/data/v1/get? ls_data callbackjQuery11230903969942572268_1651624511350sortColumnsUPDATE_DATE,SECURITY_CODEsortTypes-1,-1pageSize50pageNumber1reportNameRPT_LICO_FN_CPDcolumnsALLfilter(REPORTDATE2023-09-30) ls_response gf_https_apex(ls_url,ls_data,ls_method) */String ls_url,ls_data,ls_response//请求的URL和数据 ls_url as_url ls_data as_dataOleObject lole_https //声明ole lole_https CREATE oleobject long llr any la llr lole_https.ConnectToNewObject(WinHttp.WinHttpRequest.5.1) lole_https.setTimeouts (50000,50000,50000,10000) la lole_https.open (as_method,ls_url, false) //OPEN if not upper(as_method) DELETE then lole_https.setRequestHeader (Content-Type, application/json)lole_https.setRequestHeader (Content-Length,string(len(ls_data))) end iflole_https.setRequestHeader (charset,UTF-8) lole_https.setRequestHeader (User-Agent,Mozilla/5.0) //这个是Apex的RESTful需要的lole_https.Send(ls_data) /* 关键是这一步如果你的https的环境没有安装浏览器的认证的根证书一定会报错退出 如果你申请安装了verisign等权威机构发的根证书用ie打开上面的https就不会报红色警告问你是不是继续。 但pb不会提示你是不是继续直接报错退出。verisign的证书一年好像要1万-10万元的服务费。在这里你如果想测试一下 你可以把上面的https地址换成https://www.alipay.com/ (支付宝的)不会报错的。注意这里的证书及验证都是单向验证不是双向的。 */IF lole_https.Status 300 THEN ls_response string(lole_https.Status) : string(lole_https.StatusText)MessageBox (HTTPs request failed:,ls_response ) return ls_response END IF blob lb_body lb_body lole_https.responseBodyls_response string(lb_body,EncodingUTF8!) //返回结果//销毁 ole destroy lole_httpsreturn ls_responseend function 3 运行效果 窗口上的调用https请求的函数代码 string ls_url,ls_data ls_url sle_url.text ls_data sle_data.textstring ls_ret ls_ret gf_https_apex(ls_url,ls_data,as_method)mle_resp.text ls_ret3.1 GET请求数据 【GET】按钮上的代码 //GET wf_https(GET)数据库表上的数据 3.2 POST添加数据 【POST】按钮上的代码 //POST wf_https(POST)3.3 PUT修改数据 【PUT】按钮上的代码 //PUT wf_https(PUT)3.4 DELETE删除数据 【DELETE】按钮上的代码 //DELETE wf_https(DELETE)4 Apex的AutoREST的其它服务 GET一条记录GET分页设置查询条件GET数据按查询条件DELETE数据批量从本地文件加载数据等等不再举例演示了
http://www.zqtcl.cn/news/405229/

相关文章:

  • php网站开发安全网站建设管理教程视频教程
  • 网站建设的空间是什么意思海络网站
  • 深圳华强北今晚网站优化推广公司
  • 网站建设行业好做吗太原网站改版
  • 寿光企业建站流程个人网站用什么软件
  • 网站建设与管理自考本全国卷wordpress 关闭文章修订
  • 兴义市建设局网站首页网站开发项目实训总结
  • 个人网站空间收费网络软文营销案例
  • 网站开发文件结构组成微网站移交
  • 西安全网优化 西安网站推广网页浏览器缩略词
  • 网站开发及企业推广营销型网站建设怎么收费
  • 网站建设与管理ppt课件百度云盘关键词推广营销
  • c asp.net网站开发书宁波建设业协会网站
  • 政务网站建设发言材料知名互联网公司有哪些
  • 网站搭建制作建e室内设计网画图
  • 重庆市建设工程施工安全管理信息网北京seo公司网站
  • 国外做调查问卷的网站建设邮费自己的网站 要不要购买服务器的
  • 网站建设和优化排名四川建设网官网证书查询入口
  • 如何搜名字搜到自己做的网站电子商务平台icp备案证明
  • 网站建设与管理工作内容北京网站建设价
  • 做网站选哪个语言软文营销的方法
  • 青岛正规公司网站建设公司中国建设银行注册网站
  • 免费个人网站平台关键词检索
  • 定制型网站建设推广宁河网站建设
  • 主流网站开发语言有哪些电子邮件营销
  • 扫描二维码进入公司网站怎样做在万网上域名了怎么做网站
  • 销售型网站设计怎么做网站广告位
  • 网站推广的方法ppt购物网站logo
  • 网站关键词分割wordpress为展示的作品投票
  • 建立网站 域名 服务器吗wordpress超链接出错