使用GET方法发送有效负载

时间:2012-03-31 09:59:19

标签: java http curl get payload

据我所知,GET不应该有有效载荷数据。但是,Assembla API使用GET和数据

curl -i -X GET -H "Accept: application/xml" -H "Content-type: application/xml" -d @file.xml https://super:super@www.assembla.com/spaces/:space_id/remove_members

当我在详细模式下使用curl时,请求如下:

GET /spaces/ad-redesign-cms/remove_members HTTP/1.1
Authorization: Basic <some token>
User-Agent: curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Host: www.assembla.com
Accept: application/xml
Content-type: application/xml
Content-Length: 49

GET是否可以使用cURL传输数据?如果是这样,我如何制作Java等效代码?

0 个答案:

没有答案