http-post

Android HTTPPOST not working

I am using the following code to try to send a POST to a web service StringBuffer helloReq = new StringBuffer(); helloReq.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); helloReq.append("<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12...

Android HTTP POST Content-Length Exception

I have a simple program that sends an HTTP POST. It works only if the line httpost.addheader("Content-Length","18") is not present. Otherwise it fails. In the code, it's the line with "--->" Commenting this line out makes the POST succeed. Android does not send the POST if that line is in the code and returns with a Protocol Exception ...

What is the difference between [AcceptVerbs(HttpVerbs.Post)] and [HttpPost]?

I can decorate an action either with the [AcceptVerbs(HttpVerbs.Post)]/[AcceptVerbs(HttpVerbs.Get)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(string title) { // Do Something... } or with the [HttpPost]/[HttpGet] attributes [HttpPost] public ActionResult Create(string title) { // Do Something... } Are they di...

PartialView and HTTPPOST action

Hello Everybody, I've a problem with partial view and controller HTTPPOST action : When I'm in HTTPPOST to my partialview, only partial is return, not index page with partialview. I don't understand why! The context : I've an offer(associated with a viewmodel), composed of 4 parts : Client, SwimmingPool, Cover, Resume I would like ...

How can I use an Excel formula (no VBA) to retrieve a piece of data within an HTTP POST response?

Is there any way to craft an Excel hyperlink formula that would send an HTTP POST on click and parse the response to populate another cell? ...

Android - How do you pass a byte[] to a .net Webservice using HttpClient / HttpPost?

How can I call a Webservice with a byte[] parameter? Tried using the namedvaluepairs, but they take strings only. I am not using the Ksoap2, we decided to use the HttpClient / HttpPost method. Anyone have any ideas? Here is my code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setCont...

How do I upload a zip file via HTTP post using VBA?

This question has been asked many times by others in some form or another but most remained unanswered or the given answer is "Use C#, duh!", which incidentally, is a non-answer. ;-) I want to upload a zip file to a web server via VBA. The server side code already exists and works well; it accepts zip files via manual form upload and do...

HTTP Post XML document - server receives only first line

I have C# application that sends an XML document to a server via HTTPS Post. The problem is that the server receives only the first line <?xml version="1.0" encoding="UTF-8"?>. Here is a truncated version of my code (important parts only). What could be causing this problem? Is there modify in my code? SSL connectivity to the server...

zend framework posting json via rest

Hi guys, Im trying to build an authenticating api with rest and also post a large object. Im talking about posting number of items such as some information about a car and its owner and store the information at a db level. is rest the way to go with this or use soap ? and if so any ideas how i can post json objects ? Much appreciate it....

iPhone: NSURLConnection not working with POST data for https on WiFi

Hi All, I have a piece of code that uses NSURLConnection to send a request to the server(HTTPS). The request has POST data (url parameters) attached to it using setHTTPBody. The piece of code works fine on device on GPRS data network. But, when trying on a secured WiFi network, the NSURLConnection calls delegates didRecieveResponse and ...

JSON and HTTP POST through URL

Hi, How can I allow my servlet to accept 4 parameters via HTTP POST through a URL? Example of URL: http:///servlet The information returned will be in text format using the JSON format. JSONObject myStr = new JSONObject(); Am using Model-View-Controller access model. JSP are my view pages, Servlets are my controllers and model are...

POST parameters when submitting runtime generated content

Hello, I want to transmit data via POST to a remote script. A set of data is generated with Javascript and I would to know what's the best practice for gathering data before sending it. I tried to use: <ul> <li>Item added at runtime</li> </ul> I included all of these in a form, but I can't access the information on the server. What's...

POST data, Sessions and other forms transmitted to another website

Hi, I am an affiliate of an online store, and I promote it through my own website which is targeted for a specific language. One of the issues i'm having with my affiliated site, is that he would not translate his website to the language I am promoting it in. Meaning, when I redirect to his website with my referral code, the visitor is...

How do boundaries work in multipart post requests?

I trying to upload a file from an iPhone to a server. I'm trying to avoid using any libraries that aren't made by apple, and from what I can tell it looks like I'll need to go pretty low level on constructing my request. Can someone tell me what the "boundary" is in a multipart/form-data request and how to use it properly? ...

Testing a method that implements IHttpHandler.ProcessRequest

So I have a method that implements IHttpHandler.ProcessRequest. It accepts an HttpContext parameter. This parameter is just a form that is filled out with some XML. Here is the HTML that I am using to generate the post context: <html> <body> <form name="form1" method="post" action="http://localhost:7703/api.ashx"&gt; <textarea name="XML...

RoR: POST to a page using raw form data. How?

Is there a ruby method to POST form data encoded in "x-www-form-urlencoded" as specified here? http://www.w3.org/MarkUp/html-spec/html-spec_8.html I am aware of Net::HTTP.post_form, but because I have several values to post which share the same name I can't use a hash, which is required by that method. To clarify, I have a string of th...

Send image(jpg) via HttpPost from Android to Servlet(WebServer)

Hi guys, I have an image sitting on my SDcard (of type jpg) and I am trying to send the image via HttpPost to my servlet running on Apache Tomcat 7.0 So far I have google-ing the way to do this but I can't seem to find the perfect way. Do any of you might have some suggestion or solution to this problem? Thank you in advance, Sammy St...

how to send a json object from java to a .net client?

hi, from my android client i am sending a json to string object.but the .net client is getting it as empty string. here is my code. HttpPost request = new HttpPost(SERVICE_URI+"/save"); JSONStringer json = new JSONStringer() .object() .key("cno").value("2000") .key("cname").value("HI") .key("cmail").value("HI") .key("cphno").value("...

Grabbing the Value of a Form and Using POST

Would like to post the value of a dynamic selection menu when the OnChange event is called. My code is currently this: <form action="test4.php" method="POST" name="itemform"> <select name="input_name" id="input_name" onChange="this.form.submit();"> <?php while($row = mysql_fetch_array($result)) echo "<option value='".$row['i...

Allowing PHP $_POST with htaccess

Hi all. I'm not so good on htaccess but was happy with what I had done so far until I noticed my $_post variables were not being processed because of the rewrite signiture within my htaccess file (SIGH) My objective was to read the url and determine it's path and location from php and it's $_SERVER['request_uri'] method, which works fin...