我正在使用以下代码:
val tables = List(Emails.emails)
val setup = DBIO.sequence(
tables.map(_.schema.create.asTry)
)
Await.result(db.run(setup).map(a => {
println("/****\n\n\n\n\n\n\n\n\n\n\n\n\n")
println(a)
println("\n\n\n\n\n\n\n\n\n\n\n\n\n*************/")
}), Duration.Inf)
每个请求的标头“ Set-Cookie”和“ Cookie”都不相同
示例:
Try
Dim postdata As String = "" + i
Dim reQ As HttpWebRequest = DirectCast(WebRequest.Create(""), HttpWebRequest)
reQ.Method = "POST"
reQ.KeepAlive = True
reQ.UserAgent = ""
reQ.ContentType = "application/x-www-form-urlencoded"
reQ.Referer = ""
reQ.Headers.Add("Set-cookie", "")
reQ.Headers.Add("Cookie", "")
Dim bytes As Byte() = Encoding.UTF8.GetBytes(postdata)
reQ.ContentLength = bytes.Length
Dim reQS As Stream = reQ.GetRequestStream
reQS.Write(bytes, 0, bytes.Length)
reQS.Close()
Dim res As HttpWebResponse
res = DirectCast(reQ.GetResponse(), HttpWebResponse)
Dim Reader As New StreamReader(res.GetResponseStream)
Dim page As String = Reader.ReadToEnd
If page.Contains("") Then
Else
End If
Catch ex As Exception
End Try
End Function
我不知道如何每次为每个请求获取Set-Cookie和Cookie 我确实知道如何使用正则表达式,但这不适用于标头(至少我是这样认为的)
有人可以帮我吗?