http-post

Submit webform via URL only?

微笑、不失礼 提交于 2019-12-01 04:29:34
问题 I'm not really sure this belongs here, so instead of downvoting just lemme know if so and I'll quickly move it on. Anyway, there is a website that has a search page, that when hitting the search button it doesn't include the search query in the URL. After searching for something, the page is redirected to ssearch.asp, but as said, the query isn't there. My question is if there is a way to submit the search values solely via URL. I was wondering if there is a way to fake the search-submit

Posting a JSONArray to WCF Service from android

流过昼夜 提交于 2019-12-01 03:47:00
问题 I am having trouble posting a JSONArray of values to my WCF Service. When I post the data from Fiddler or .Net Test Client it works fine. Every time I try to post from my android application I get Request Error This is the JSON data that I send to my WCF Service from the android application. I've tried this exact data from Fiddler and it works [{"date":"2013-02-22 15:30:374:021","id":"1","description":"test","name":"test"}, "date":"2013-02-25 11:56:926:020","id":"2","description":"ghy","name"

Why can't I send `None` as data in a POST request using Python's `requests` library?

瘦欲@ 提交于 2019-12-01 03:24:13
问题 It seems that when a key in data has a value of None , the key isn't included by requests. >>> req = requests.Request('POST', 'http://google.com', data=dict(a=None, b=1)) >>> req.prepare().body 'b=1' Why is this the case? I was expecting an empty string, or something like json.dumps(d) where None is rendered as null . I'm sure there's a good reason -- just curious about what it is. (One thing I can think of is that maybe there just isn't an encoding of null or None available to the POST

What is the default behaviour of a controller action not marked with AcceptVerbs, HttpGet or HttpPost?

◇◆丶佛笑我妖孽 提交于 2019-12-01 03:21:49
If I create a controller action and do not decorate it with AcceptVerbs , HttpPost or HttpGet . What is the default behaviour? Does the action allow any access method or does it default to GET ? It's accessible via any verb. In Web API 2.1: it depends on the name of the action. If the action starts with "Get*" then it will default to only accept GET requests. If it starts with "Put*" then it will default to only accept PUT requests. Same with POST. If it doesn't start with any known verb then it will default to only accept POST. Here are the results of my testing: public class BlahController :

Laravel 4 make post request from controller to external url with data

陌路散爱 提交于 2019-12-01 03:07:36
I am looking for a way to make a post request from a controller to an external url. The data being posted is a php array. The url to recieve is an ecommerce API in an external url. The post has to be done from the controller method. The url should reply with 'success', 'error', 'failure' or 'trylater' string. I have tried the following with no success: return Redirect::to("https://backoffice.host.iveri.com/Lite/Transactions/New/Authorise.aspx", compact($array)); I have tried curl too: $url = 'https://backoffice.host.iveri.com/Lite/Transactions/New/Authorise.aspx'; //url-ify the data for the

In Laravel, how can I get *only* POST parameters?

二次信任 提交于 2019-12-01 02:26:06
I know that one can use $request->get('my_param') or Input::get('my_param') to get a POST or GET request parameter in Laravel (I'm toying with v5/dev version now, but it's the same for 4.2). But how can I make sure that my my_param came via a POST parameter and was not just from a ?my_param=42 appended to the URL? (besides reverting to the ol' $_POST and $_GET superglobals and throwing testability out the window) (Note: I also know that the Request::get method will give me the POST param for a POST request, if both a POST an URL/GET param with the same name exist, but... but if the param land

Multiline curl command

£可爱£侵袭症+ 提交于 2019-12-01 02:24:53
I am trying to modify a curl request that was captured with Google Chrome Dev Tools. Here is what the command looks like curl "http://WEBSITE" -H "Host: WEBSITE" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" --compressed -H "Content-Type: multipart/form-data; boundary=---------------------------1184875127259" --data-binary "-----------------------------1184875127259"^ "Content-Disposition: form-data; name=""FORM1"""^ "FORM1DATA"^ "-----------------------------1184875127259"^ "Content-Disposition: form-data; name=""FORM2"""^

RequestBody of a REST application

南笙酒味 提交于 2019-12-01 01:50:34
问题 Iam bit new to SpringMVC REST concept. Need a help from experts here to understand/ resolve following issue, I have developed a SpringMVC application, following is a part of a controller class code, and it works perfectly ok with the way it is, meaning it works ok with the JSON type object, @RequestMapping(method = RequestMethod.POST, value = "/user/register") public ModelAndView addUser( @RequestBody String payload) { try{ ObjectMapper mapper = new ObjectMapper(); CreateNewUserRequest

ASP MVC3 - HttpPost action not found after publish

浪子不回头ぞ 提交于 2019-12-01 01:09:33
I have an ASP MVC3 application that has several HttpPost ActionResult methods. During a debug session, the methods work fine. But when I publish and view the web app in the browser only the HttpPost methods fail. Firebug shows a "404 not found". Other non-HttpPost methods in the same controller work fine. UPDATE: 1) The published url for the app is localhost/psp. 2) All the GET actions return URLs of http://localhost/psp/ 'controller'/'action'. 3) The POST actions are returning URLs of http://localhost/ 'controller'/'action'. So this seems to be a routing problem. The only route I have in my

iMacros Http POST to API endpoint

走远了吗. 提交于 2019-12-01 00:55:47
I want to do an HTTP POST from inside an iMacro to an API endpoint. Effectively, something like the following: curl -d "data=foo" http://example.com/API In iMacros, it might look something like this: my-imacro.iim VERSION BUILD=10.4.28.1074 TAB T=1 URL GOTO=javascript:post('http://example.com/API', {data: 'foo'}); function post(path, params, method) { // Reference: http://stackoverflow.com/a/133997/1640892 method = method || "post"; var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); for (var key in params) { if (params