求解 posturl 时 url中问号后面内容消失

Ethan Tung 2016-12-15 12:27:10
执行posturl之后服务端返回了错误信息{"errno":3,"error":"auth failed"}

发现post执行时,url中'?'问号后面的内容都没有了,只剩‘POST http://api.heclouds.com/register_de ’了
不知道是什么原因,求帮助解答一下

...全文
2615 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ethan Tung 2017-01-03
  • 打赏
  • 举报
回复
引用 1 楼 lzp_lrp 的回复:
参考pb的帮助

Blob lblb_args

String ls_headers

String ls_url

String ls_args

long ll_length

integer li_rc



li_rc = GetContextService( "Internet", iinet_base )

IF li_rc = 1 THEN

ir = CREATE n_ir

ls_url = "http://localhost/Site/testurl.stm?"

ls_args = "user=MyName&pwd=MyPasswd"

lblb_args = Blob( ls_args )

ll_length = Len( lblb_args )

ls_header = "Content-Type: " + &

"application/x-www-form-urlencoded~n" + &

"Content-Length: " + String( ll_length ) + "~n~n"

li_rc = iinet.PostURL( ls_url, lblb_args, &

ls_header, ir )

END IF


想请教一下,这样的数据格式该怎么写,register_code是写在ls_args里面,但是如图“http内容”是写在那个参数里面,不是本专业的,谢谢啦。
WorldMobile 2016-12-15
  • 打赏
  • 举报
回复
参考pb的帮助 Blob lblb_args String ls_headers String ls_url String ls_args long ll_length integer li_rc li_rc = GetContextService( "Internet", iinet_base ) IF li_rc = 1 THEN ir = CREATE n_ir ls_url = "http://localhost/Site/testurl.stm?" ls_args = "user=MyName&pwd=MyPasswd" lblb_args = Blob( ls_args ) ll_length = Len( lblb_args ) ls_header = "Content-Type: " + & "application/x-www-form-urlencoded~n" + & "Content-Length: " + String( ll_length ) + "~n~n" li_rc = iinet.PostURL( ls_url, lblb_args, & ls_header, ir ) END IF

662

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder Web 应用
社区管理员
  • Web 应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧