- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要向 Web 服务器发送 POST 请求,并能够读取该服务器发送的响应。
我尝试使用带有以下代码的 HTTPBuilder 库:
def http = new HTTPBuilder('http://myServer/')
http.setProxy("Proxy_IP", 8080, "http")
postBody = [cmd:'e',format:'sep',c:'a',b:'b',t:'u',r:'r',kl:'lop']
http.post( body: postBody,
requestContentType: URLENC ){ resp ->
HttpEntity he = resp.getEntity()
println "${resp.getAllHeaders()}"
println he.getContentType()
println "${resp.getEntity().getContent()}"
}
ERROR errors.GrailsExceptionResolver - EOFException occurred when processing request: [GET] /PROJECT/home/index
Unexpected end of ZLIB input stream. Stacktrace follows:
Message: Unexpected end of ZLIB input stream
Line | Method
->> 240 | fill in java.util.zip.InflaterInputStream
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 158 | read in ''
| 116 | read . . in java.util.zip.GZIPInputStream
| 138 | read in org.apache.http.conn.EofSensorInputStream
| 184 | read . . in java.io.InputStreamReader
| 140 | read in java.io.Reader
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Accept: */*[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Content-Length: 160[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Content-Type: application/x-www-form-urlencoded[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Host: myServer[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Proxy-Connection: Keep-Alive[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Cookie: ASPSESSIONIDSSTTACTA=NFJKHEDRFGTKCGFEHGFKOANP[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Cookie2: $Version=1[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "Accept-Encoding: gzip,deflate[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "[EOL]"
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> POST myUrl HTTP/1.1
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Accept: */*
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Content-Length: 160
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Content-Type: application/x-www-form-urlencoded
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Host: myServer
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Proxy-Connection: Keep-Alive
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Cookie: ASPSESSIONIDSSTTACTA=NFJKHEDRFGTKCGFEHGFKOANP
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Cookie2: $Version=1
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.headers - >> Accept-Encoding: gzip,deflate
2012-01-06 16:50:12,219 ["http-bio-8080"-exec-2] DEBUG http.wire - >> "postbody"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "HTTP/1.1 200 OK[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Date: Fri, 06 Jan 2012 15:50:14 GMT[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Server: Microsoft-IIS/6.0[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "X-Powered-By: ASP.NET[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Content-Type: text/html[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Cache-control: private[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Via: 1.1 BAYEC-BC-20[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Transfer-Encoding: chunked[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Proxy-Connection: Keep-Alive[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Connection: Keep-Alive[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Content-Encoding: gzip[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << HTTP/1.1 200 OK
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Date: Fri, 06 Jan 2012 15:50:14 GMT
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Server: Microsoft-IIS/6.0
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << X-Powered-By: ASP.NET
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Content-Type: text/html
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Cache-control: private
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Via: 1.1 BAYEC-BC-20
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Transfer-Encoding: chunked
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Proxy-Connection: Keep-Alive
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Connection: Keep-Alive
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.headers - << Content-Encoding: gzip
[Date: Fri, 06 Jan 2012 15:50:14 GMT, Server: Microsoft-IIS/6.0, X-Powered-By: ASP.NET, Content-Type: text/html, Cache-control: private, Via: 1.1 BAYEC-BC-20, Transfer-Encoding: chunked, Proxy-Connection: Keep-Alive, Connection: Keep-Alive, Content-Encoding: gzip]
Content-Type: text/html
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "226[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x1f]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x8e]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x2]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x0]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x0][0x0][0x0][0x0][0x4][0xb]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x9c]S[0xc1][0x8e][0xda]0[0x10]G[0xbd]W[0xda]ps[0xe9][0xa5][0xc1]E[0xd5][0xaa]K[0xeb][0xa4]Zh[0x16]![0x1]BI[0xee][0xc8]$[0x3][0xb1]j[0x92]`O[0x10]|[0xf2][0xee]W[0xd4][0xb1][0x3][0x82][0xec][0xa5][0xad][0x1e4]9[0xf6]x[0xe6]y[0xde][0x9b][0x99][0x87][0xf][0xc84][0x10][0xf6][0xd1][0xf7][0xf9]N[0xf1]2[0x17][0x8fa]H [0x8][0xfb]Z[0x93][0x1c][0xcc]'[0xb9][0xf0][0xfd][0xf0][0xa1][0xf5]"v[0xb5]K[0x1b][0x93][0xce][0xd2]y[0x14][0xc6][\r][\n]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Y+[0xd8]*80[0xea]l[0xd6][0x85]IQ[0xfe]&[\n]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "d[0xe0]i<K[0xd0][0x5][0x034]z[0xa4]0[0xa23e][0x81]G[0xc7]i[0x9a][0xac][0x9e][0xa7]QB[0xed][0xe5] [0xd3][0xda]#x[0xae]![0xf0][0x10]NH[0xdb][0xb3]y[0x95][0x15][0xb8][0x97][0xe6][0xdf][0xbe]W[0x0][0xcf][0xbb][0xed][0x1e][0x90][0x93][0x2][0xb1][0xf6][0xe1][0xd0][0x88]c[0xe0]M[0xcaa][0x12][0xa1]D?5[0x8][0x1e][0xc9][0xdc][0xa9][0x83]j!~[0x90][0xac][0xe0]J[0x3][0x6]BW[0xfe][0xd3][0xd3][0xe3][0xc8][0x1f]z[0x1d][0x18][\n]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0x94][0x10][0xc6]fz[0xaf][0xba][0x91][0xc68][0xd1]P&[0x92][0xf9b][0xbc][0xf][0xcdd][0x1b][0x2][0xa3][0xee][0xd6]1[0xa2]7)l[0xaa][0xfc][0xdc][0x1][0x14]_[0xef][0xa3]?[0xc1][0xe9]53[0xb2]T[0xe5]=[0x18][0x19]~[0xf9]6[0x1a]=2j[0x2][0x1c] [0xcf2][0x8d]Q{S[0xa9][0x1c]T[0xe0][\r]M[0xe6][0x92]k[0x1d]xY[0xd5]Hch[0x94][0xcbd][0xe6]M[0x97](a[0xa8]B[0x86]9[0xc9][0xee][0x9d][0x0][0x5]([0xf0]B[0xa6]QU[0xe5].L[0x5]*`[0xb4];[0x19][0x6]y[0x1b][0xe5]r[0xb5][0x9c5]fF;[[0x85]V[0xc1][0xef][0x94]n[0x10][0xf5]`[0x83][0xc1a][0xd4]Qd[0xa0][0x7][e[0xcb][0x93]L[0xe2][0xd9]*M(o[0xb0][0x82][0x13]d[0xfa] [0x7]\[0xd7]?[0xcb]foj[0x1d]82^[0xb8][0xfc]5#[0x1a][0xb8][0xca][\n]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "Fyx[0xed][0x95][0xeb]#wX/[0xf1]J[0xbf][0xc1]Y[0x99][0xec]dsq[0xe2]xPT[0x17]"f[0xf7][0x1d7]b<7h[0x84]|[0xaf][0xc6]4ZF[0xf1]l[0xf2][0x9f][0xa8][0xb1]i;[0xdb][0x1d]}[0x91]5H[0xc8]L[0xf][0x9][0x8d][0xa2]4[0x9b][0xac][0xca][0xa1][0xed]Fe[0x1a]k[0xab][0xaa]=9[0xae][0xbb][0xe3]NUM[\r][0x8d][0x19][0x1e][0xfd].[0x9]j[0xb]!Z\(;[0x1d][0xba]'o[0x90][0xaf][0xec]>;[0x8f]q[0xec]B[0xc7][0xe9]z61[0x93][0xd3]3[0x8f]&[0xd1]4J[0xa3]y[0xcf][0x9c][0xbc][0xc4][0xeb]h[0x9c9][0x92][0x9e][0xd9][0x80],V[0xf3]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[0xa4]on[0xbcd][0x17][0xc9][0xaf2]o[0xc1e][0x1b][0xdc][0x16][0xa5][0x3][0xca1]7SB[0xdb]9t[0x489][0xfd][0x1][0x0][0x0][0xff][0xff]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[\r]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[\n]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "0[EOL]"
2012-01-06 16:50:15,687 ["http-bio-8080"-exec-2] DEBUG http.wire - << "[EOL]"
Transfer-Encoding: chunked
Content-Encoding: gzip
最佳答案
尝试使用 HTTPBuilder 的 setContentEncoding () 方法。
http.contentEncoding = ContentEncoding.Type.GZIP
关于Groovy HTTPBuilder : Getting the entity content from a GZIPed Chunked response,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8760713/
我正在尝试使用 Node js 服务将 .json 文件的内容获取到 angularjs 方法中。但是我得到以下错误: _http_outgoing.js:700 throw new ERR_INVA
我使用的是 npm 版本 6.0.1。我的操作系统是 macOS High Sierra 版本 10.13.3 我想构建我的项目,但收到此错误消息: Creating an optimized pro
import numpy as np from matplotlib import pyplot as plt import scipy.io.wavfile as wav from numpy.li
下面是一段c++代码: Chunk * _chunk = new (size) Chunk(size); 我不明白'new'后面的第一个'(size)',它是什么意思?以上代码来自JDK8。 最佳答案
我有一个 RSS 提要。当我在打开 Fiddler Web Debugger 的情况下浏览提要时,Fiddler 向我抛出此错误: Chunked body did not terminate pro
当我运行脚本 npm run watch 时出现此错误 cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --wat
我在尝试启动我的应用程序时看到以下错误... > css-modules@1.0.0 start /Users/johnnynolan/Repos/css-modules webpack && ope
我正在使用 MVC 6 rc1 和 EF 7 rc 1 Code First 模型通过 Web API Controller 检索数据。我有 3 个类似于下面的表。 class Product {
我在一个 txt 文件中有以下数据: 00001+++00001 000031 12.8600 -1 7 BEAR 1990052418 276.0
我正在试用 RestAssured 并编写了以下语句 - String URL = "http://XXXXXXXX"; Response result = given().
我在 RMarkdown 文档中有一个块,如下所示: ```{r, echo=-4} a <- 1 b <- 2 x <- a + b print(paste(c("`x` is equal to "
这个迭代器 let data = vec![0, 1, 2, 3, 4, 5]; for x in data.chunks(2) { println!("{:?}", x); } 会产生 [0
flock() 的 PHP 文档页面表明在IIS下使用不安全。如果我不能在所有情况下都依赖 flock,是否有其他方法可以安全地实现同样的目标? 最佳答案 在所有想象的可能情况下,没有其他方法可以安全
我正在开发一个 Android 示例应用程序,它从 http://www.omdbapi.com/ 获取电影列表. REST 服务是: http://www.omdbapi.com/?s=star&a
我正在寻找 MemoryStream 的实现,它不会将内存分配为一个大块,而是一组 block 。我想在内存(64 位)中存储几 GB 的数据,并避免内存碎片的限制。 最佳答案 像这样: class
我们有一个 React 应用程序,它使用 React.lazy 和 Suspend 进行代码拆分。每个星期二我们都会部署一个新版本,因此我们的 block 也会发生变化。 我们现在遇到的问题是,如果我
我对Laravel的ORM Eloquent chunk()方法有疑问。 它错过了一些结果。 这是一个测试查询: $destinataires = Destinataire::where('statu
我需要知道是否可以将 iTextSharp 中的两个 Chunk 组合起来 Phrase phrase = new Phrase(); var text1 = new Chunk("hello");
我正在使用播放框架来生成分块响应。代码是: class Test extends Controller { public static void chunk() throws Interrup
这个问题已经有答案了: Split array into chunks (80 个回答) 已关闭 5 年前。 我正在尝试在 JavaScript 中实现一个类似于 lodash chunk 的 blo
我是一名优秀的程序员,十分优秀!