5,557
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
rtc开发公众号
RtcDataRequest 发送表单数据(form)的代码运行没问题,如下
with RtcDataRequest1 do
begin
Request.Method := 'POST';
Request.ContentType := 'charset=utf-8';
Request.FileName := '/cgi-bin/message/template/send?'
+ 'access_token=' + Edit3.Text;
with r.newRecord do
begin
asText['touser'] := Edit5.Text;
asText['template_id'] := TemplateID;
end;
Request.Params.Clear;
Request.Params.Text := r.toJSON;
Post;
end;
现在的问题是怎么只发送body数据(附上ishttp的代码
http := TIdHttp.Create(nil);
http.Request.ContentType := 'application/json';
jsonToSend := TStringStream.Create('{"name":"Peter Pan"}');
jsonToSend.Position := 0;
Memo1.Lines.Text := http.Post('http://.../test.php', jsonToSend);
jsonToSend.free;
http.free;
)
第一次用rtc,请大神们帮忙