cURL POST command line on WINDOWS RESTful service
|
My problem: Running windows 7 and using the executable command line tool to curl my localhost server api for POST data was returning me an error that seems to be really common. The request was being sent properly with the exception that the data was not reaching the server as it should causing my REST service to insert data with null values. What seems to be causing the error: imagine something like this
Result of the returning data
After some searching i figured out that problem couldn't be the sintax used for the request since it works on UNIX shells.
I tried to work around with those " escaping it \" but it still didn't work 2.
3.
So i gave up. Windows seems to messing up with the JSON object sent on POST |
|||||||||
|
|
I ran into the same issue on my win7 x64 laptop and was able to get it working using the curl release that is labeled Win64 - Generic w SSL by using the very similar command line format:
Which only differs from your 2nd escape version by using double-quotes around the escaped ones and the header parameter value. Definitely prefer the linux shell syntax more. |
cURL POST command line on WINDOWS RESTful service的更多相关文章
- Cookies with curl the command line tool
w https://curl.haxx.se/docs/http-cookies.html curl has a full cookie "engine" built in. If ...
- [转]How do I run msbuild from the command line using Windows SDK 7.1?
本文转自:http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-win ...
- How to install IIS 7.5 on Windows 7 using the Command Line
原文 How to install IIS 7.5 on Windows 7 using the Command Line On Windows Vista, to install IIS 7.0 f ...
- Create Windows Server 2008 cluster from the command line
How to create a Windows Server 2008 cluster from the command line? Creating a cluster in Server 2008 ...
- [Windows]远程管理服务WinRM远程管理Windows服务器 Invalid use of command line. Type "winrm -?" for help.
运行环境 Windows 2012 R2 1. Windows需要打开WinRM服务,Server系统默认打开,默认端口5985 # WinRM服务查看 PS C:\Users\Administrat ...
- MySQL 5.7 Command Line Client输入密码后闪退和windows下mysql忘记root密码的解决办法
MySQL 5.7 Command Line Client输入密码后闪退的问题: 问题分析: 1.查看mysql command line client默认执行的一些参数.方法:开始->所有程序 ...
- windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help
windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...
- [RabbitMQ]Windows环境下rabbitmqclt(Command Line Tools)出现Erlang distribution failed错误的解决方法
摘要 当使用rabbitmqctl时出现Erlang distribution failed,把%SystemRoot%Windows\System32\config\systemprofile下的. ...
- 如何在Windows下开发Python:在cmd下运行Python脚本+如何使用Python Shell(command line模式和GUI模式)+如何使用Python IDE
http://www.crifan.com/how_to_do_python_development_under_windows_environment/ 本文目的 希望对于,如何在Windows下, ...
随机推荐
- Jenkins Code Sign error: No provisioning profiles found
=== BUILD TARGET JenkinsTest OF PROJECT JenkinsTest WITH CONFIGURATION Release === Check dependencie ...
- Java基础集锦——利用Collections.sort方法对list排序
要想对List进行排序,可以让实体对象实现Comparable接口,重写compareTo方法即可实现按某一属性排序,但是这种写法很单一,只能按照固定的一个属性排序,没变法变化.通过下面这种方法,可以 ...
- 项目管理知识体系指南(PMBOOK指南)(第5版) 阅读摘要
1.7.2 项目经理的人际技能 领导力: 团队建设: 激励: 沟通: 影响力: 决策能力: 政治和文化意识: 谈判: 建立信任: 冲突管理: 教练技术: 3.4 规划过程组 在制定项目管理计划和项目文 ...
- SASS用法指南-转
作者: 阮一峰 日期: 2012年6月19日 原文地址:http://www.ruanyifeng.com/blog/2012/06/sass.html 艹,没想到sass 2012年就有了.现在 ...
- 图解 Java IO : 二、FilenameFilter源码
Writer :BYSocket(泥沙砖瓦浆木匠) 微 博:BYSocket 豆 瓣:BYSocket FaceBook:BYSocket Twitter ...
- Windows batch,echo到文件不成功,只打印出ECHO is on.
jenkins 执行Windows batch command的时候,如果想要读写文件,echo到文件不成功. bat 代码如下: set ctime=%date%_%time% echo %ctim ...
- 百度地图api根据定位获取附近商家(只获取屏幕内)
根据中心点坐标计算出屏幕2个点(一个最低经纬度,一个最高经纬度),判断这两个点中间的所有坐标的商家..考虑屏幕分辨率之类 移动地图中心点变动,如何异步刷新,判断商家是否已经存在..等... 百度地图a ...
- Visual Studio 2015开发Android App启动调试始终无法完成应用部署的解决方案
创建一个Android App项目后,直接启动调试发现Visual Studio Emulator for Android已成功运行,但应用始终处于Build中(等待时间超过1小时),并未如预期通过a ...
- 【cs229-Lecture19】微分动态规划
内容: 调试强化学习算法(RL算法) LQR线性二次型调节(french动态规划算法) 滤波(kalman filters) 线性二次高斯控制(LGG) Kalman滤波器 卡尔曼滤波(Kalman ...
- undefined function mysql_connect()解决方法
在配置apache+php+mysql后,打开一个php网页文件正常,但是php网页中连接数据库时,出现以下提示: Fatal error: Call to undefined function my ...