Home > Uncategorized > Get To Post Proxy

Get To Post Proxy

I was having problems getting a HTTP POST to work via Ajax while running Phonegap on Android, so in my frustration, I found a workaround. A proxy that converts a HTTP Get Request into a HTTP Post request.

http://get2post.freetextuk.com? – followed by the URL with the data in GET format.

The proxy is quite simple:

var strUrl = Request.ServerVariables[“QUERY_STRING”];
if (string.IsNullOrEmpty(strUrl))
Response.Write(“A QueryString is required”);
int locQ = strUrl.IndexOf(“?”);
if (locQ == -1)
Response.Write(“No data to post?”);
var strPostUrl = strUrl.Substring(0, locQ);
var strPostData = strUrl.Substring(locQ+1);

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: