post

convention for post actions in asp.net mvc

i see the convention is to have the post action be the same name as the page but to put a: [AcceptsVerb.HTTPVerbs.Post] on the action method. Is there anything wrong with have the post action be another name. So if i have a page called Edit, the Edit action will display that page, while the "Update"action will post the edit changes....

How can we upload the file using http post?

I am using HTTP API called HttpClient to upload the file using "post", but haven't been able to find any sample code for the same. Any ideas? Any examples/implementations? Edit:- I meant HTTP API called HttpClient - See "Consuming RESTful Services with HttpClient" here ...

Strange delay POSTing from php fsockopen

Hi all, I'm working with the following section of php code. The purpose is to POST an image file from one server to another. This works perfectly and very quickly as long as the file is < ~250k. Much over 250k, and the process time jumps to ~60 seconds, and increases from there with image size. Any ideas? Thanks! John $fileContents ...

POST file - not from client machine, from web/ftp server

I'm using .Net. Is it possible for a web form to upload an image from a web or FTP server? The files I need to submit are on the web. If this is possible, code snippet is appreciated. ...

Posting a jaiku using xcode

NSMutableURLRequest *jaikuRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.jaiku.com/json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [jaikuRequest setHTTPM...

no value from $_POST

No value is sent to $_POST['addEdit'] variable :(, pls help HTML code: <form name='frm' method='POST' action=''> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr class="heading"> <td style="width:5px;"><input type="checkbox" name='check_all' onClick='checkAll();' /></td> <td class="head">App Name</td> . . <?php //som...

How do you use a variable in a $_POST[]

I need to iterate through a bunch of dynamically generated fields, but this doesn't work: $population_density = $_POST['$current_location_id']; I have a list of locations with their populations on one page; I need to make it so you can update a lot of them at once. So I made the field names dynamically correspond to the location_id. W...

HTTP POST, Redirect from ASP .Net to JSP/ColdFusion which way is best Server Side or Client Side ?

I want to post data to another server (JSP or ColdFusion). Note: Post which means the data is required at the another server also the browser should be redirected automatically. Is it better to use form tag...input type hidden fields, values ... and from javascript form.submit(); or HttpWebRequest myRequest = (HttpWebReque...

Sorting Featured Posts (Wordpress)

I can display posts from featured category like so: query_posts('tag=featured'); ... but is it possible to further sort it using a dropdown/select menu: <select name=""> <option value="reviews">Reviews</option> <option value="articles">Articles</option> <option value="interviews">Interviews</option> </select> ... so when one ...

Checking Correct Answer and Submitting Form

I am admittedly not as skilled in PHP as I would hope to be. Most of my experience is with Wordpress loops. I'm trying to create a very simple quiz that carries the number of correct answers in the URL (eg. domaindotcom/?p=3 if they've got 3 correct answers so far). I'm using the following PHP code to start it off: <?php /* Gets ...

POST becomes a GET in Flash Builder 4 beta 2 according to Fiddler monitor?

My HTTPService requests in Flash Builder 4 are working fine for GETs but not for POSTs, where I am sending along params in addition to the name/value pairs on the query string. According to the Fiddler monitor, the header always shows a GET even when I explicitly set the method = "POST". I step through my code and see the method being ...

Multiple file uploader $_POST issue

I have the following form that uses some jQuery to allow an array of files to be submitted: <form enctype="multipart/form-data" action="index.php" method="post" > <input type="file" class="multi" name="test[]" /> <input type="submit" value="submit" name="submit" /> </form> When I use method="get" I get the following URL when submitt...

PHP Conditional logic, specific order?

Hello everybody, I have a conditional statement which goes thusly: if ($_POST['password'] == $_POST['repeat'] && $_SESSION['type'] == "admin") But let's say I also want the conditional to evaluate true to users with type "superuser" (instead of "admin"). So I could, for example, write: if ($_POST['password'] == $_POST['repeat'] && $...

asp.net mvc postback

I have a controller with the following two Edit methods. The edit form displays correctly with all additional dropdown lists from the FormViewModel. However, when I changed some field values and submitted the form. None of the changed fields were saved. The fields in the postbask collection have default or null values. I have another...

What is server to server posting script?

I am integrating a 3rd party module into my site. I read their documention, but I stuck at this line: "Your script should then do a server-to-server posting to our server. For example: https://www.domain.com:XXXX/gateway..." What is it? I write a php page with a POST-form: <form action"https://www.domain.com:XXXX/..." method="post"> ....

How do I know what's the right Content-type to use when sending XML data using HTTPS POST?

Is it "application/x-www-form-urlencoded", "multipart/form-data", "application/xml", "text/xml" or something else? And more importantly, how do I know when to use which? This is a very old article which says to use "multipart/form-data" and that "application/x-www-form-urlencoded" is bad. Is that still valid advice? http://skew.org/xml/...

Django view does not redirect when request by jQuery.post().

hi, I've got a menu to switch languages in my Django template. I call, via POST, the "/i18n/setlang/" view shown below to change the language setting. When I use a html form the user is redirected as expected, but when I use jQuery.post(), it is not. What am I missing? Thanks Call to the view using jQuery.post(): $.post("/i18n/setla...

Submitting Html Form Through Java Code

Actually I want to submit a html Form through java code. i use Apache HttpClient API Post method for this but when i send the request it return me same page with filled form instead of submitting it. When i open that Html Form which i want to submit through java code i came to know that it has a ajax call to submit. i want to know ...

Ruby on Rails POST parameters on redirect_to

I have to make a call to a different url in one of my controllers on my site. The problem is that with all the parameters the other site requires I'm overflowing the url. Is there anyway to call another url from the controller and send all of the parameters using a POST? I'm not expecting a response from the other site. Also, I think...

Google App Engine: Easy way to work with GET, POST and Cookies

When using webapp from Google App Engine, how can I distinguish POST and GET? Which one gets priority and how can I seprate them? A piece of code below shows the way to obtain a POST/GET field value: class AddWordHandler(webapp.RequestHandler): def post(self): theWord = str( self.request.get('theWord', default_value="no") ) ...