一个 cURL 请求中有多少数据

How much data is in one cURL request

我将向网络服务器发送简单的数据,很可能只是作为 GET 请求发送:

我想如果它使用的数据较少,我可以通过 SSH 执行此操作 - 但我看不出这是多少。

因此,如果我在 myurl.com/parsedata.php?id=1&.... 等中发送它,那么每个请求需要发送多少数据?该页面不会加载任何内容,它将通过 cURL 或类似的协议进行加载。

那么,通常每个请求会包含多少数据?

谢谢。

您可以简单地从命令行 运行 curl 使用 -v 选项进行详细输出,并查看发送到服务器和返回的数据。这是我对这个问题的 URL:

卷曲时得到的结果
curl  -v
* Hostname was NOT found in DNS cache
*   Trying 104.16.103.85...
* Connected to whosebug.com (104.16.103.85) port 80 (#0)
> GET /questions/31789124/how-much-data-is-in-one-curl-request HTTP/1.1
> User-Agent: curl/7.35.0
> Host: whosebug.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 04 Aug 2015 08:51:53 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=d89a0800ec97e30cad4dedad83d88e8dd1438678312; expires=Wed, 03-Aug-16 08:51:52 GMT; path=/; domain=.whosebug.com; HttpOnly
< Cache-Control: public, no-cache="Set-Cookie", max-age=60
< Cf-Railgun: 5107f6033d 18.60 0.037768 0030 4701
< Expires: Tue, 04 Aug 2015 08:52:53 GMT
< Last-Modified: Tue, 04 Aug 2015 08:51:53 GMT
< Vary: *
< X-Frame-Options: SAMEORIGIN
< X-Request-Guid: 3f5aca8a-2715-4fcf-b68b-f71f85a620e0
< Set-Cookie: prov=fcd7db27-9d37-4235-afb6-5c3d76dc03f5; domain=.whosebug.com; expires=Fri, 01-Jan-2055 00:00:00 GMT; path=/; HttpOnly
* Server cloudflare-nginx is not blacklisted
< Server: cloudflare-nginx
< CF-RAY: 210905e0082d03b8-SIN
<
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/QAPage">
... html content follows here ...

所有 > 行都是作为请求发送到服务器的内容(作为套接字连接上的纯文本),< 行是收到的内容。