我发出HTTP GET请求
char write = "GET /image.png HTTP/1.1\r\n";
响应标题
HTTP/1.1 200 OK
Content-Type: image/png
Date: Mon, 26 Sep 2016 03:40:54 GMT
Connection: keep-alive
Content-Length: 14021
�PNG�;oq
有没有办法只获取邮件正文并避免响应标题?
答案 0 :(得分:1)
根据RFC 7230,回复的格式如下:
HTTP-message = start-line
*( header-field CRLF )
CRLF
[ message-body ]
因此,在结果中搜索前两个CRLF。身体开始的地方..