post

jQuery post options

Hey, I just can't work it out. I need to send a POST request to PHP backend. It should be the following: Array ( [username] => 'username' [password] => 'password' [action] => 'login' ) I have a form as a frontend and i use .serialize() to get the user and password. But how can i add the action key/value? For now i just add the str...

How do I do an http post to code behind in asp.net webforms?

Hi, How can I call a method in the code behind from a jQuery post in asp.net webforms? In MVC it's simple, I just do this: $.post("/MyController/MyMethod", { data: somedata; }, function(result) { alert(result); }); but I can't figure how what to put for the first parameter if I wanted to call a method in the code behind in webforms....

codeigniter and ajax cannot access the post

On my website I am using ajax post request to show content around my site, this is done using this code, $("a.contentlink").click(function(ev) { ev.preventDefault(); $('#main_menu').hide(); var url = $(this).attr("href"); var data = "calltype=full&url="+url; $.ajax({ url:url, type: "POST", da...

Adding tags to posts in Ruby on Rails

I am creating a blog in Rails using the Scaffold feature. I would like to add a 'tags' field to each post like on StackOverflow and Wordpress. I can do this with a string type ( scaffold post title:string body:text tags:string ) and then comment seperated but this isn't a good practice, since I also want the reader to be able to browse b...

Image file posted not viewable when written to file

Hi, I'm sending an image file from an iPhone application to a http Post application. The Post application is a java restful web service that accepts Post requests. I have the Post method receiveing a byte array and then writing it to a file like this: private void writeToFile(byte[] str) { String strFilePath = "/Users/j/Desktop/joe.pn...

How to post a HTML form using Javascript that has both "application/x-www-form-urlencoded" and "charset=UTF-8" in the Content-Type header

Hey, I need to be able to specify using Javascript how to post a form that contains both the enctype as "application/x-www-form-urlencoded" and charset as "charset=UTF-8" in the Content-Type header. Any ideas? I have a aForm object of type Form. Thanks! ...

Passing parameters while posting status to Twitter using Terminal with CURL

How to pass additional parameters to this twitter update api by using curl from terminal? http://twitter.com/statuses/update.xml Say I need to pass replyto user id as given in the documentation. Although I could simply append @username before the message, I need user id based and @user_id didn't work. ...

Prevent downloading of a http content body

Hi. Currently I've got a web app that retrieves the URL of a mp3 on an external server, but to conserve data I'd like to check first that the page my server is retrieving is actually a redirect, not the actual content (so I can grab the URL of the mp3 and NOT the actual mp3 itself. The external PHP script requires that json data is ...

Why is Post code being triggered on jQuery load?

I have the following functions in my ProceduresControlller: Function Add(ByVal bpid As Integer) As ActionResult Return View(GetAvailableProcedures(bpid)) End Function <AcceptVerbs(HttpVerbs.Post)> _ Function Add(ByVal bpid As Integer, ByVal code As String, ByVal covered As Boolean) As ActionResult AddProcedure(bpid, codes, cove...

Login to site with HttpClient Post

I am trying to make a program that logs into a site and performs some automated activities. I have been using HttpClient 4.0.1, and using this to get started: http://hc.apache.org/httpcomponents-client/primer.html. On this particular site, the cookies are not set through a "set-cookie" header, but in javascript. So far, I am unable to...

How to post a array with $.post ?

Here is my array: arr[0]='A'; arr[1]='B'; .... I tried to post it this way: $.post('data.php',arr,function() { }); But fails to work as expected. ...

How do I POST XML data with curl

I want to post XML data with cURL. I don't care about forms like said in How do I make a post request with curl. I want to post XML content to some webservice using cURL command line interface. Something like: curl -H "text/xml" -d "<XmlContainer xmlns='sads'..." http://myapiurl.com/service.svc/ The above sample however cannot be pro...

Sending POST data with GET request valid?

Using Curl for example, I can "post" data in a GET request. Is this a valid thing to do? With that I mean: Is it not forbidden by any RFC specification? Does someone out there use it with good reason? Thanks for any help. ...

POST to different page depending on SELECTvalue?

I have a form, depending on the selected value of my <select> box I would like to send to a different page. I do not know the best way to do this, but I am thinking that maybe the best way is to have an intermediate page to always post to, then have the intermediate page check the value sent from the <select> box and forward the POST va...

Partial Parameter Value not passed using HTTP Post

Hi, I am new to HTTP Post and encounter an strange issue. I have a request object defined as below: [DataContract(Namespace = "http://Test.com/WCF")] public class Request { [DataMember] public string CardNumber { get; set; } [DataMember] public string CardExpDate { get; set; } [DataMember]...

try to open a page every 10 seconds

Using Javascript (or Ajax) I want to connect to a page (a .php page) every 10 seconds. This will be done in user-side (browser) within a web page. Just, I'm trying to see the online users. I have about 1-2 visitors daily, in my personal web site. ...

Server returns error 503

Hi, I've added a feature in my app that sends POST request to my web server. I've tested it and it does run fine. But at some moment when I tried to run again the app, then it crashes. I've found out the error 503 that says Server is unavailable. My question was what should I do to prevent my app from crashing when I've receive this err...

iPhone sending POST with NSURLConnection

I'm having some problems with sending POST data to a PHP script with NSURLConnection. This is my code: const char *bytes = [[NSString stringWithFormat:@"<?xml version=\"1.0\"?>\n<mydata>%@</mydata>", data] UTF8String]; NSURL *url = [NSURL URLWithString:@"http://myurl.com/script.php"]; NSMutableURLRequest *request = [NSMutab...

How do I post to a user's wall through a facebook iframe app?

I have a simple iframe facebook app. I need the app to post content to the current user's wall. I'm doing everything in PHP and JS. Currently, the only facebook-specific PHP I have is to get the current user's ID, and the only JS I have is to get the iframe to size to the contents. How do I have a dialogue pop up with predetermined co...

IE8 is posting form data partially

Everything was working perfectly ... suddenly after I installed Visual studio 2010 beta2, IE8 started to behave strangely. Only the data that was sent to the browser gets posted back when submit button is clicked. Any additional fields are ignored and are nulls. It works perfectly on FireFox 3.5+. I uninstalled Visual studio 2010 beta2 ...