注册 登录
编程论坛 Delphi论坛

idHTTP 向网站用HTTP GET提交数据是用idHTTP.Get(); 还是用idHTTP.Post();

bccnme 发布于 2007-05-19 14:07, 1802 次点击
我看在indy9 help里是这样解释的:

Get :
Retrieves an HTTP resource.

procedure Get(AURL: string; const AResponseContent: TStream); overload;
function Get(AURL: string): string; overload;

Get is an overloaded method used to retrieve the file or data for the resource specified in AURL.

Post:
Send HTTP data to a web server or CGI program.

function Post(AURL: string; const ASource: TStrings): string; overload;
function Post(AURL: string; const ASource: TStream): string; overload;
function Post(AURL: string; const ASource: TIdMultiPartFormDataStream): string; overload;
procedure Post(AURL: string; const ASource: TStrings; const AResponseContent: TStream); overload;
procedure Post(AURL: string; const ASource: TStream; const AResponseContent: TStream); overload;
procedure Post(AURL: string; const ASource: TIdMultiPartFormDataStream; AResponseContent: TStream); overload;

Post is an overloaded method in TIdHTTP that is used to send data specified in ASource to the resource location in AURL。

所以有些疑惑,indy里的get post和asp里的get post是对应的吗?
0 回复
1