http-post

Delphi TIdHTTP POST does not encode plus sign

孤者浪人 提交于 2019-12-11 03:18:21
问题 I have a TIdHTTP component on a form, and I am sending an http POST request to a cloud-based server. Everything works brilliantly, except for 1 field: a text string with a plus sign, e.g. 'hello world+dog', is getting saved as 'hello world dog'. Researching this problem, I realise that a '+' in a URL is regarded as a space, so one has to encode it. This is where I'm stumped; it looks like the rest of the POST request is encoded by the TIdHTTP component, except for the '+'. Looking at the

Retrofit SocketTimeoutException (and/or http 500 error) on http-POST

冷暖自知 提交于 2019-12-11 03:09:32
问题 I'm trying to do a POST request to our backend server, but I keep getting SocketTimeOutExceptions or HTTP 500 error. And it keeps switching between those two randomly (even with the same values). Things I've already tried adding OkHttp library (v2.4.0) for some reason I get the error that it's might not be supported though retrofit says it supports v2.0.0+ source implementing Callback<Account> into the class instead of this, it also gave me the http500 more than the newer version this, I've

Is Python requests doing something wrong here, or is my POST request lacking something?

假装没事ソ 提交于 2019-12-11 03:05:06
问题 I'm currently writing a program which will help users to determine optimal times to make a post on tumblr. As with Twitter, most followers have so many subscriptions that there is no way they can keep up, meaning it's best to know when one's own specific following is (mostly) online. On tumblr this can be determined in two ways -- first whether they have recently shared any content which was recently posted, and secondly whether they have recently added to their liked-posts list.

How to make HTTPS Post request from android to different port (not 443)?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 02:56:20
问题 Here is how I try to make HTTPS Post request in android String server ="https://myserver.com:4343/api"; HttpClient client = new DefaultHttpClient(); HttpPost request = new HttpPost(server); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("property", value)); request.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8")); client.execute(request); Now I have an error "No peer certificate", though certificate is correct and I

HTTP Error 405.0 - Method Not Allowed — POST Fails

空扰寡人 提交于 2019-12-11 02:56:07
问题 I have an HTML web page that should submit back to itself, but constantly fails if method="POST". It works with GET, but we really want POST. I have ripped out all of the code until there is nothing left but an input and a submit, but it always gets the 405 error. This temp web page is as stripped down as I can make it. I am running this test off my PC running IIS 7. <form id="form1" action="PhoneTest3.html" method="POST"> <label for="contactPhoneExt">Contact Phone: </label> <input id=

javascript: make a POST call on button click

送分小仙女□ 提交于 2019-12-11 02:45:24
问题 I want to make a POST on button click by adding an event listener to it, but with ajax I can make the call but I do not have any data or success, error criteria for the same. one way I found was using form submit event, but I guess it is not the right way to do it, I should be making a POST call on button click. <div id="googleSignInDiv" class="cols-row "> <form id="googleSignInform" action="/connect/google" method="post" target="google-auth-window"> <button type="submit" class="btn-primary

“Missing file” error while uploading file to server using HTTP post

橙三吉。 提交于 2019-12-11 02:25:34
问题 I want to upload a file from my android device to a server. I am using the below code for that: File file = new File("/sdcard/Pictures/","wallpaper.png"); try { Log.i("fileupload","checking file exists="+file.exists()); Log.i("fileupload","checking file length="+file.length()); HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(url); InputStreamEntity reqEntity = new InputStreamEntity(new FileInputStream(file), file.length()); reqEntity.setContentType("binary

Trouble in posting data as form data in Angular JS to Java REST web-service

馋奶兔 提交于 2019-12-11 02:23:56
问题 I am trying to create a web service in Java that accepts two lists as FormData parameter. I have used the Angualr JS http service as mentioned in this answer. var queryRequest = $http({ method:'POST', url:'services/test/testPath', data:$.param({"listA":myList1,"listB":myList2}), headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'} }); My object myList1 var myList1=[]; var obj={}; obj["val1"]=1 obj["val2"]=2 myList1.push(obj); My object myList2 var myList2=[]; var obj={

How to post data from android to yii framework server getting error

陌路散爱 提交于 2019-12-11 02:20:06
问题 I am suffering problem during getting value from yii framework sever. From yii developer side , he says me you are nothing giving me any input data, but i all ready give data from xml format. He says, i am getting imput null. YII developer Said to me: He getting null in input $input = $GLOBALS['HTTP_RAW_POST_DATA']; Why input is null, would you guys any idea behind this problem. My android side: String url="http://test.org/site/test"; String input = String.format("<Es_Request><Data><UserName>

AFNetworking HTTP POST upload image stopping when near completion

倖福魔咒の 提交于 2019-12-11 02:14:16
问题 I am using the code below to HTTP POST a multi-part web form, including a JPEG image. Code: NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; [params setObject:nameField.text forKey:@"name"]; [params setObject:emailField.text forKey:@"email"]; [params setObject:titleField.text forKey:@"title"]; [params setObject:dateString forKey:@"link"]; [params setObject:descriptionTV.text forKey:@"content"]; [params setObject:tag forKey:@"tags"]; NSData* sendData =