submit a form in a new tab
I’d like (just to test some functions, after I’ll avoid this behaviour) to load the page called by submit on a new tab : is it possible? 8 Answers 8
I’d like (just to test some functions, after I’ll avoid this behaviour) to load the page called by submit on a new tab : is it possible? 8 Answers 8
When I try to POST to a URL it results in the following exception: The remote server returned an error: (417) Expectation Failed. Here’s a sample code: var client = new WebClient(); var postData = new NameValueCollection(); postData.Add(“postParamName”, “postParamValue”); byte[] responseBytes = client.UploadValues(“http://…”, postData); string response = Encoding.UTF8.GetString(responseBytes); // (417) Expectation Failed. Using an HttpWebRequest/HttpWebResponse … Read more
I’m trying to run a HTTP Request in Swift, to POST 2 parameters to a URL. Example: Link: www.thisismylink.com/postName.php Params: id = 13 name = Jack What is the simplest way to do that? I don’t even want to read the response. I just want to send that to perform changes on my database through … Read more
I have some parameters that I want to POST form-encoded to my server: { ‘userName’: ‘[email protected]’, ‘password’: ‘Password!’, ‘grant_type’: ‘password’ } I’m sending my request (currently without parameters) like this var obj = { method: ‘POST’, headers: { ‘Content-Type’: ‘application/x-www-form-urlencoded; charset=UTF-8’, }, }; fetch(‘https://example.com/login’, obj) .then(function(res) { // Do stuff with result }); How can … Read more
Is there a way to send data using the POST method without a form and without refreshing the page using only pure JavaScript (not jQuery $.post())? Maybe httprequest or something else (just can’t find it now)? 13 Answers 13
This is what I found by Firebug in Firefox. Values of disabled inputs will not be submitted Is it the same in other browsers? If so, what’s the reason for this? 8 Answers 8
I am trying to do POST with HttpURLConnection(I need to use it this way, can’t use HttpPost) and I’d like to add parameters to that connection such as post.setEntity(new UrlEncodedFormEntity(nvp)); where nvp = new ArrayList<NameValuePair>(); having some data stored in. I can’t find a way how to add this ArrayList to my HttpURLConnection which is … Read more
I’m using PHP’s function file_get_contents() to fetch contents of a URL and then I process headers through the variable $http_response_header. Now the problem is that some of the URLs need some data to be posted to the URL (for example, login pages). How do I do that? I realize using stream_context I may be able … Read more
I need to make a POST request via cURL from the command line. Data for this request is located in a file. I know that via PUT this could be done with the –upload-file option. curl host:port/post-file -H “Content-Type: text/xml” –data “contents_of_file” 5 Answers 5
This question may have been asked before but no it was not definitively answered. How exactly does one post raw whole JSON inside the body of a Retrofit request? See similar question here. Or is this answer correct that it must be form url encoded and passed as a field? I really hope not, as … Read more