post

Where to write XML with XmlWriter for sending via HttpWebRequest POST in ASP.NET?

Here is my code, see the part that says ???WHAT TO DO HERE??? I am not sure where I write this XML to in order to be able to send it in my POST via the objRequest there... string project_id = context.Request.QueryString["project"]; string person_id = context.Request.QueryString["person"]; string post_date = context.Request.QueryString["...

Any idea why this ASP.NET C# code to send http request is not working?

Code is below, when I hit the page with: http://ryan.local.testmode.com/timecrunch/bctimepost.ashx?project=2593059&person=2831215&date=04/16/2009&hours=2.5&case=555 it just sort of hangs with the loading bar moving slowly forever till I stop it, did I forget to do something? I can't figure out which line of code is use...

Send headers along in python

I have the following python script and I would like to send "fake" header information along so that my application acts as if it is firefox. How could I do that? import urllib, urllib2, cookielib username = '****' password = '****' login_user = urllib.urlencode({'password' : password, 'username' : username}) jar = cookielib.FileCoo...

How do I upload an image/file using a post request in C#?

C# provides functionality to submit a post request, but there is nothing about uploading an image/file on MSDN. I'd like to do this without using raw headers. Related questions Upload files with HTTPWebrequest (multipart/form-data) ...

Posting using POST from C# over https

Hi, After wasting two days with this question (and trying to make it work), I've decided to take a step back and ask a more basic question, because apparently there's something I don't know or I'm doing wrong. The requirements are simple, I need to make an HTTP post (passing a few values) over https from C#. The website (if given the...

JQuery AJAX syntax

I am trying to find the correct syntax to pass a varible to my JQuery Post. var id = empid; $.ajax({ type: "POST", url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders", data: "{empid: empid}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { alert(resu...

Virtual PHP Form

I have a PHP file that spits out a form. I want to call this PHP file server-side, (currently using "include"), fill it in, and submit it. This is better so I don't have to meddle around with the actual form PHP, just deal with the presentation layer so the data gets understood by its own PHP file. Is this possible? The form "method" i...

Cannot post successfully if not using cassini for JQuery posts in ASP.NET MVC

Hi When i set my project to start app using Visual Studio Development server (Cassini:Port) my JQuery posts properly to the following URL "SomeController/SomeMethod". When i use localhost to run with the following URLS, it does not work "http://localhost/Store/SomeController/SomeMethod" or "SomeController/SomeMethod". Any one facing...

PHP header redirect not working when posting a form - using output buffer - but does in other cases?!

Hi, I have an unusual problem, only happening on one server. Following code .... elseif ($_GET['action']=='login') { if (empty($_POST['login_name'])) { $_POST['login_name']=''; } if (empty($_POST['login_pass'])) { $_POST['login_pass']=''; } if (!empty($_POST['send'])) { if (($_POST['login_name']==_ADMIN_NAME) and ($_POST['logi...

barebones minimal example: using XUL to http POST

I am trying to figure out if XUL is a good candidate for GUI forms in intranet apps. It's been difficult to find anyone who actually uses it though. Therefore I thought I'd ask for a hello world style example. Suppose I have a php page that does nothing but display any content sent to it via HTTP POST. (e.g., http://mysite.com/postdump...

Is it possible to fill in an Ajax form programatically?

Hi, I'm doing some automation work and can make my way around a site & post to HTML forms okay, but now I'm up against a new challenge, Ajax forms. Since there's no source to read, I'm left wondering if it's possible to fill in an Ajax form progamatically, in C#. I'm currently using a non-visible axWebBrowser. Thanks in advance for yo...

ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError

First off, I am a newbie when it comes to JMS & ActiveMQ. I have been looking into a messaging solution to serve as middleware for a message producer that will insert XML messages into a queue via HTTP POST. The producer is an existing system written in C++ that cannot be modified (so Java and the C++ API are out). Using the "demo" ex...

How to post JSON to PHP with curl

I may be way off base, but I've been trying all afternoon to run the curl post command in this recess PHP framework tutorial. What I don't understand is how is PHP supposed to interpret my POST, it always comes up as an empty array. curl -i -X POST -d '{"screencast":{"subject":"tools"}}' \ http://localhost:3570/index.php/traini...

How to post params from javascript to asp.net?

Hi, I have a javascript code which builds a link with 2 params. Now, I know how to post these params using the address, but I don't want to use it. I've tried using cookies for posting the params, but somehow I can't read them on the server side. this is the client side code document.cookie="name="+"value"; this is the server side...

Multiple forms in ASP.NET MVC

Context Let`s say i have: In layout Site.Master: <div class="leftColumn"> <asp:ContentPlaceHolder ID="MainContent" runat="server" /> </div> <div class="rightColumn"> <% Html.RenderPartial("_Login"); %> <asp:ContentPlaceHolder ID="SideContent" runat="server" /> </div> Login partialView looks like: <form action="/myApp/...

Using $.post within a javascript function, cannot assign value to a variable?

Hi, I'm trying to use $.post within a function, get the results, then return the function true or false based on the results of the $.post callback. However, the callback seems to occur, AFTER the return event of the parent function. Here's the current code the ret variable is always undefined but if I alert() it within the $.post callb...

Why is POST data lost when submitting from a Custom 404 page in IIS 6.0?

I built a Custom 404 CMS system in .NET 3.5, and while posting data works locally in IIS 5.1 and 6.0, it does not work on the production IIS 6.0 server. I compared the IIS 6.0 site settings item by item, and they are nearly identical, with the only differences not mattering. I verified that the form is POST-ing to "http://domain/folder...

WebClient.UploadValues Duplicate Key

I am having a bit of difficulty proxying a request on my site. In theory, this should work webClient.UploadValues(url, "POST", HttpContext.Current.Request.Form); Unfortunately, the form contains a duplicate key "elemKey" When I use HTTP Analyzer and look at the post data it shows that key three times, with three different values. Par...

Multiple Parameters with POST and MVC

Ok. So I have two elements on a page which are not located in a single form. I need these to be posted back to my controller via the JQuery.Ajax() method. Now the problem I have is that while my parameters do correctly post they only do so if I set them as strings and they include the parameter name in the value. So: Public ActionResult...

Django: custom constructor for form class, trouble with accessing data from request.POST.

Hello. I have written custom constructor for a form, the whole form class looks like this: class UploadForm(forms.Form): file = forms.FileField(label = "Plik") def __init__(self, coto, naglowek, *args, **kwargs): super(UploadForm, self).__init__(*args, **kwargs) self.coto = coto self.naglowek = naglowek...