如何解决如何使用查询字符串/参数以HTTP GET方法检索数据?
set data {}
# Read in standard pattern
set f [open "input.txt"]
set rawdata [read $f]
close $f
# For each line...
foreach line [split $rawdata "\n"] {
if {[string trim $line] eq ""} continue; # skip blank lines,just in case
# Split the line into variables
lassign $line key value
# Accumulate,adding up the values for each key
dict incr data $key $value
}
# Sort the result by the keys,type-punning the dict to a list
set data [lsort -stride 2 -index 0 -integer $data]
# Write the data back out
set f [open "output.txt" "w"]
foreach {key value} $data {
puts $f "$key $value"
}
close $f
我的网址正确吗?
JAVA代码:
URL : http://X.X.X.X/APPLICATION/abc?a=1
我正确处理了吗?
解决方法
删除abc后的问号。
value = "/abc"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。