1,593
社区成员
发帖
与我相关
我的任务
分享
var
rbody:tstringstream;
begin
rbody:=tstringstream.Create('{"name":"lina"}') ;
IdHTTP1.Request.Accept := 'text/javascript';
IdHTTP1.Request.ContentType := 'application/json';
IdHTTP1.Request.ContentEncoding := 'utf-8';
memo1.Text:=idhttp1.Post('http://127.0.0.1/idhttpjson.php', RBody);
end;
var_dump($_POST);
var
Param:TStringList;
begin
Param:=TStringList.Create;
Param.Add('name=lina');
memo1.Text:=IdHTTP1.Post('Http://127.0.0.1/idhttpjson.php', Param);
end;