Foxtable(狐表)用户栏目专家坐堂 → post提交数据


  共有4556人关注过本帖树形打印复制链接

主题:post提交数据

帅哥哟,离线,有人找我吗?
lxhmax
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:637 积分:5704 威望:0 精华:0 注册:2012/8/2 19:04:00
post提交数据  发帖心情 Post By:2022/6/25 19:33:00 [只看该作者]

Dim st As New Date(1970,1,1,8,0,0)
Dim timeSign As Long = CLng((Date.Now - st).TotalMilliseconds())
Dim clientId As String = "aeeragerwqerwertwer"
Dim jiekou As String = "sale/company/posthouse"
Dim tokenSign As String = CExp(clientId & timeSign & Functions.Execute("tokenSign"))
tokenSign =Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tokenSign, "MD5").ToLower()
Dim url As String = "http://hu.com/gateway/" & jiekou & "?clientId={0}&timeSign={1}&tokenSign={2}"
Dim requrl As String = CExp(url,clientId,timeSign,tokenSign)

Dim jo As New JObject
jo("bianhao") = CStr("11111")
jo("xiaoquId") = CStr("22222")
jo("shi") = CStr("3")
jo("ting") = CStr("2")
jo("wei") = CStr("1")
.....
这里的传输字段有30个左右~

Dim bodystr As String = jo.ToString
Output.Show(requrl)
Output.Show(bodystr)

Dim hc As New HttpClient(requrl)
hc.Content = jo.ToString
jo = JObject.Parse(hc.GetData)
Output.Show(jo.ToString)


请问老师,这个要怎样才能将红色部分转换成下面的方式post数据
http://hu.com/gateway/sale/company/posthouse?clientId=aeeragerwqerwertwer&timeSign=1656156489173&tokenSign=b105ba7f6dbe7d200af3437fa387288d&bianhao=11111&xiaoquId=22222&shi=3&ting=2&wei=1....
[此贴子已经被作者于2022/6/26 10:26:35编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/6/26 20:11:00 [只看该作者]

如果是post方式提交数据,和url没有什么关系呀。加上ContentType试试

Dim hc As New HttpClient(requrl)
hc.ContentType = "application/json"
hc.Content = jo.ToString
dim res as string = hc.GetData
Output.Show(res )

 回到顶部