http-post

[Android] Host is unresolved in LAN

Im getting a IOExeption 'Host is unresolved' on HttpPost. The Endpoint in this case a a computer on my LAN with a webservice. (http://pc259:8080/test/service.asmx). Im using WIFI to my LAN. Does Android know to to resolved computernames? StringEntity se = new StringEntity(xmlDataToSend); se.setContentType("text/xml"); HttpPost httppost ...

ASP.Net MVC & Comet (WebSync)

I'm trying to implement comet in my ASP.Net MVC 2.0 project. I'm using WebSync from FrozenMountain. My website is coded in C# 4.0 and ASP.Net 4.0. The comet code is triggering my MVC controller function with the [HttpPost] attribute (even though the page doesn't refresh or appear to post). Is there a way to determine what is being post...

How can we send a HTTP POST request by using JavaScript?

How can we send a request using the HTTP POST method via javascript...without submitting a form? ...

Blackberry MD5 authentication with HTTP Post

Hi, I need to send to a server in POST an email (String) and a password (MD5 hash in byte[]). Below how I get my MD5 hash where "password" is a String (what the user enter): byte[] passMD5 = Crypto.encodeStringMD5(password); And the function: public static byte[] encodeStringMD5(String s) throws Exception { byte[] bytes = s.getB...

Testing a website using C#

Folks, I need to accomplish some sophisticated web crawling. The goal in simple words: Login to a page, enter some values in some text fields, click Submit, then extract some values from the retrieved page. What is the best approach? Some Unit testing 3rd party lib? Manual crawling in C#? Maybe there is a ready lib for that specific...

How can I redirect a HTTP POST request immediately after the headers are processed?

On Windows CE, I am currently in a situation where we implement a simplistic web server from scratch. The predominant use of this server will be in a one-to-one USB RNDIS connection. The server is hosted by the managed application running on the device. Therefore, we tightly integrated POST request handling with delivered web pages. Ins...

receiving xml file via http post

Hi, I have a test script to receive an xml file via http post and it appears to work ok when I use it internally. When I move the script to a web server which can be accessed externally nothing appears to be happening. Anyone any ideas? <?php if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { $inp = fopen("php://input"); $o...

Responding to an idempotent HTTP POST request

Part of our RESTful API will allow users to register an item with a serial number. As the serial number is not globally unique it cannot be used as the identifier of the resource, so we'll use a POST to the parent resource which will generate an identifier, e.g. POST /my/items <item serial-number="ABCDEF" /> In the case where the ite...

receiving xml files via http post - security

Hi, I've a basic php script set up on a web server to accept xml files received sent via Http post. So far so good. But I'm wondering about security issues and what other things I would need to be aware of before I could put this live. Has anyone done this beofre and what things I should be aware of? Basically all I have so far is: <?...

How do I post my user name and password to a web page?

I want to post my user and password with Perl to a website. The source of the login page is: <div class="top">Sign In</div> <div class="row"><label for="username">Username:</label></div> <div class="row"><div id="login:usernameContainer"> <input id="login:usernameContainer:username" type="text" name="login:userna...

A potentially dangerous Request.Form value was detected

I'm using a php script to http post some xml files to a .net URL. When I submit I get the response: A potentially dangerous Request.Form value was detected from the client (<?xml version="...UTF-8"?> <!DOCTYPE cXML SYSTE..."). Description: Request Validation has detected a potentially dangerous client input value, and p...

ASP.NET MVC pass data in link not through url

I don't know if this defeats the purpose of MVC, but I'd like to have a controller that accepts 2 variables but I don't what to pass them the url. Is there easy way to do that? public ActionResult Return(string user_id, int item_id) Right now I'm making links like this <%: Html.ActionLink("Return", "Return", new {user_id = item.user_...

ASP.NET MVC - Return dictionary parameters

Alright, I'm trying to pass a Dictionary, where key = int, and value = Prototype into my view. Prototype: public class Prototype { public string Value { get; set; } public string PropertyName { get; set; } public Options Type { get; set; } } After the Dictionary has been passed into my view I'm doing a foreach loop t...

GWT: How to send POST cross domain requests with JSON

As its Javadocs suggest, the JsonpRequestBuilder can only send GET requests. I need to send POST requests using the same method (for cross domain requests using JSON). Does anybody know any working solution? I could not find any starting point on the web. thanks in advance ...

Can't do a HTTP Post to a Web Service from my Android App

I've been working on an app that uses both GET and POST requests to Web Services. The GET requests are no problems but the POST requests are killing me. I've tried 2 different scenarios in the code. The first looks like this... HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(ws); JSONObject js...

Use HTTP POST for logging into a website

I'm not sure how to do this as I've never done it before. I've seen some things on google but not sure how to use them in my situation. I want to be able to send a POST to a website ( http://www.ritani.com/salespersons/login ) with login credentials through a web browser control in .NET so I don't have to use a send-key work-around met...

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

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? ...

HTTP-GET-to-HTTP-POST proxy

Hey. I'm writing a Yahoo Pipe that requires communication with a specific web service. Unfortunately, the web service only accepts POST, and the Yahoo Pipes Web Service JSON POST module issues the POST in the wrong format. So ideally, there would be some proxy somewhere on the internet that accepts a GET, takes some parameters, and con...

Constructing a simple HTTP Post request to send a single image from iPhone

I'm trying to send a single image from my iPhone app to my Google App Engine Java server. On the server, I'm getting a FileUploadBase$InvalidContentTypeException, which is thrown when the request is not a multipart request. ServletFileUpload.isMultipartContent(req) is printing false. I'm trying to send an image, encoded as a jpeg, and...

cURL POST to REST Service

Hi, I am trying to post to a REST service using PHP cURL but I'm after running into a bit of difficulty (this being that I've never used cURL before!!). I've put together this code: <?php error_reporting(E_ALL); if ($result == "00") { $url = 'http://127.0.0.1/xxxxxx/AccountCreator.ashx'; /*I've tried it a combination of ways just...