idHTTP 向网站发送json格式数据

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
Param:TStringList;
begin
Param:=TStringList.Create;
Param.Add('name=lina');
memo1.Text:=IdHTTP1.Post('Http://127.0.0.1/idhttpjson.php', Param);
end;

https://bbs.csdn.net/topics/390551578

idHTTP 向网站发送json格式数据的更多相关文章

  1. 巧妙的使用jmeter来发送json格式数据

    1. header-manager 修改content-type值. 如果不修改该值, 则默认会是urlencode的数据格式(例如a=5&b=6). 修改为json后,会告诉服务器,发送的数 ...

  2. linux c 使用socket 发送http请求 可以发送json格式数据

    #include <stdio.h>#include <sys/socket.h>#include <sys/types.h>#include <time.h ...

  3. curl发送json格式数据

    php的curl方法详细的见官方手册. curl_setopt用法:  http://www.php.net/manual/en/function.curl-setopt.php <?php $ ...

  4. postman 发送json 格式数据

    hearder 设置 body 设置 { ", "primary_content": "{\"SN\":129,\"MPBH\&q ...

  5. 利用 CURL 发送JSON格式字符串

    /* * post 发送JSON 格式数据 * @param $url string URL * @param $data_string string 请求的具体内容 * @return array ...

  6. iOS-AFN Post JSON格式数据

    - (void)postRequest{ AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; // >>> ...

  7. 如何使用python内置的request发送JSON格式的数据

    使用步骤如下: 一.如果想发送json格式的数据,需要使用request模块中的Request类来创建对象,作为urlopen函数的参数 二.header中添加content-type为applica ...

  8. ajax发送json格式与文件数据、django自带的序列化器(了解)

    上期内容回顾 聚合查询和分组查询 # 聚合查询 max min sum avg count # 查询关键字:aggregate from django.db.models import Max, Mi ...

  9. 使用jQuery发送POST,Ajax请求返回JSON格式数据

    问题: 使用jQuery POST提交数据到PHP文件, PHP返回的json_encode后的数组数据,但jQuery接收到的数据不能解析为JSON对象,而是字符串{"code" ...

随机推荐

  1. 编译apache报APR not found

    系统环境: [vagrant@rs-2 download]$ cat /etc/redhat-release  CentOS release 5.6 (Final) [vagrant@rs-2 dow ...

  2. 踏得网互联网新技术垂直搜索服务和分享 - HTML5动效/特效/动画搜索

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/iefreer/article/details/34917729 当前主流搜索引擎在解决互联网技术创意 ...

  3. Webserver管理系列:6、网络和共享中心的安全配置

    1.关闭网络发现 2.关闭文件和打印机共享 3.关闭公用目录共享 4.启用password保护共享

  4. UVA1103-Ancient Messages(脑洞+dfs)

    Problem UVA1103-Ancient Messages Accept: 1176  Submit: 6103 Time Limit: 3000 mSec Problem Descriptio ...

  5. python 上传百度语音识别+文字返回结果

    1文字生成语音 #!/usr/bin/python3 import urllib.request import requests#导入requests库 import urllib import js ...

  6. DBN 大作业

  7. 在web.xml中通过contextConfigLocation配置spring

    <context-param>         <param-name>contextConfigLocation</param-name>         < ...

  8. 为什么说Redis是单线程的以及Redis为什么这么快!(转)

    文章转自https://blog.csdn.net/chenyao1994/article/details/79491337 一.前言 近乎所有与Java相关的面试都会问到缓存的问题,基础一点的会问到 ...

  9. mybatis的批量更新实例

    近来批量添加,删除,更新用的比较多,单一的删除和更新,操作无法满足企业某些业务的需求,故通过以下示例分享知识: 今天通过更新的例子来说明 演示环境为jdk8,maven环境,ssm框架 请准备好环境, ...

  10. centos时区设置

    [root@ logs]# tzselect Please identify a location so that time zone rules can be set correctly.Pleas ...