Tag: post

有可能在HTTP中cachingPOST方法?

用非常简单的caching语义:如果参数是相同的(当然URL是相同的),那么这是一个打击。 那可能吗? 推荐的?

我如何使用JQuery发布JSON数据?

我想将Json发布到同一台服务器上的Web服务。 但我不知道如何使用JQuery发布Json。 我已经试过这个代码: $.ajax({ type: 'POST', url: '/form/', data: {"name":"jonas"}, success: function(data) { alert('data: ' + data); }, contentType: "application/json", dataType: 'json' }); 但是使用这个JQuery代码,服务器上的Json数据不会被接收到。 这是服务器上的预期数据: {"name":"jonas"}但使用JQuery服务器接收name=jonas 。 换句话说,这是“urlencoded”数据而不是Json。 有没有办法以Json格式发布数据,而不是使用JQuery的urlencoded数据? 或者我必须使用手动ajax请求?

POST JSON失败,415不支持的媒体types,Spring 3 mvc

我想发送一个POST请求到一个servlet。 请求通过jQuery以这种方式发送: var productCategory = new Object(); productCategory.idProductCategory = 1; productCategory.description = "Descrizione2"; newCategory(productCategory); newCategory在哪里 function newCategory(productCategory) { $.postJSON("ajax/newproductcategory", productCategory, function( idProductCategory) { console.debug("Inserted: " + idProductCategory); }); } 和postJSON是 $.postJSON = function(url, data, callback) { return jQuery.ajax({ 'type': 'POST', 'url': url, 'contentType': 'application/json', 'data': JSON.stringify(data), 'dataType': 'json', 'success': callback }); }; 用萤火虫,我看到JSON发送正确: {"idProductCategory":1,"description":"Descrizione2"} 但是我得到415不支持的媒体types。 […]

PHPredirectPOST数据

我在这方面做了一些研究,有些专家说这是不可能的 ,所以我想请求一个替代scheme。 我的情况: 页面A:[checkout.php]客户填写他们的账单细节。 页面B:[process.php]生成发票号码并将客户详细信息存储在数据库中。 页面C:[thirdparty.com]第三支付网关(仅接受邮政数据)。 客户填写他们的详细信息,在页面A中设置他们的购物车,然后发送到页面B.在process.php中,将发布的数据存储在数据库中并生成发票号码。 之后,将客户数据和发票号码发布到thirdparty.com支付网关。 问题是在页面B中进行POST。cURL能够将数据发布到页面C,但问题是页面没有redirect到页面C.客户需要在页面C上填写信用卡详细信息。 第三方支付网关确实给我们提供了API样本,样本与客户详细信息一起POST发票号码。 我们不希望系统产生多余的不需要的发票号码。 有没有解决scheme? 我们目前的解决scheme是让客户在页面A中填写详细信息,然后在页面B中创build另一个页面,其中显示所有客户详细信息,用户可以点击确认button发布到页面C. 我们的目标是客户只需点击一次。 希望我的问题是明确的:)

如何使用VBA从Excel发送HTTP POST请求到服务器?

从Excel电子表格执行HTTP POST需要哪些VBA代码?

jQuery发布JSON

更新:我想将var value传递给服务器 你好,同样的老,同样的老… 🙂 我有一个名为<form id="testForm" action="javascript:test()">和一个名为<code id="testArea"></code> 我正在使用此代码串并显示代码区中的数据: var formData = form2object('testForm'); document.getElementById('testArea').innerHTML = JSON.stringify(formData, null, '\t'); var value = JSON.stringify(formData, null, '\t'); 我想要的是将这些数据发送到一个JSON文件。 我一直在这个项目上工作: http : //ridegrab.com/profile_old/ ,如果你按Submit Querybutton,你会看到页面的头部填充。 我也想用这段脚本发送数据: function authenticate(userName, password) { $.ajax ({ type: "POST", //the url where you want to sent the userName and password to url: 'username:password@link to […]

如何在node.js中创buildHTTP POST请求?

我如何使用node.js中的数据创build出站HTTP POST请求?

如何检索POST查询参数?

这是我简单的forms: <form id="loginformA" action="userlogin" method="post"> <div> <label for="email">Email: </label> <input type="text" id="email" name="email"></input> </div> <input type="submit" value="Submit"></input> </form> 这是我的Express.js /Node.js代码: app.post('/userlogin', function(sReq, sRes){ var email = sReq.query.email.; } 我试过sReq.query.email或sReq.query['email']或者sReq.params['email']等等,它们都不起作用。 他们都返回undefined 。 当我改变为一个Get调用,它的工作,所以..任何想法?

在Java中发送HTTP POST请求

让我们假设这个url… http://www.example.com/page.php?id=10 (这里id需要在POST请求中发送) 我想发送id = 10到服务器的page.php ,它接受POST方法。 我如何从Java内部做到这一点? 我试过这个: URL aaa = new URL("http://www.example.com/page.php"); URLConnection ccc = aaa.openConnection(); 但我仍然不知道如何通过POST发送它

如何在HTTP POST请求中发送参数?

在HTTP GET请求中,参数作为查询string发送: http://example.com/page?parameter = value&also = another 在HTTP POST请求中,参数不会与URI一起发送。 价值在哪里? 在请求标题? 在请求正文中? 它是什么样子的?