request

When do you use POST and when do you use GET?

From what I can gather, there are three categories - never use GET and use POST, never use POST and use GET, and it doesn't matter which one you use. Am I correct in assuming those three cases? If so, what are some examples from each case? ...

What is the preferred way to redirect a request in Pylons without losing form data?

I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do this? ...

How to get Https URL content

Hi all I have a https link that requires user login & password. If I run it in FX like this: https://[email protected]/link/sublink it will return the xml data as expected. However, what i'm trying to do, is to automate this process. I try to use file_get_contents in PHP fSocket in PHP I even try Ajax, but still.. doesn...

Is there a better way to verify if a request accepts JSON?

Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest request) { const string JsonType = "application/json"; if (request.ContentType.ToLower(CultureInfo.InvariantCulture).StartsWith(JsonType)) { return true; } if (request.AcceptTypes.Select(t => t.ToLower(CultureInfo.In...

c# (more specifically xna) how can i request a xml file via http? Doesnt need to support xbox.

So im working on a game in XNA and i need it to get a server list off our site. so i just need to do a http request to http://play.feedthezombie.com/?want=servers&enc=xml and get the contest as either a string or xml object. any clues? ...

HTTP GET in VBS

Is there a way to perform an HTTP GET request within a Visual Basic script? I need to get the contents of the response from a particular URL for processing. Thanks. ...

Getting a file from an http request in java

How do I call a url in order to process the results? I have a stand-alone reporting servlet which I link to for reports. I want to email these reports now, if I were doing this in the browser, I could just use an xhttprequest, and process the results - I basically want to do the same thing in Java, but I'm not sure how to go about it. ...

Ajax replace text with image.

I have put together the following mootools script window.addEvent('domready', function() { var shouts = "timed.php"; var log = $('log_res'); function updateData (url,target) { new Ajax(url,{ method: 'get', update: $(target), onComplete: function() { log.removeClass('ajax-loading');} }).reques...

Can I find out which control events will fire on an ASP postback?

Is it possible to get a list of control events that are going to fire before they happen, say inside the Page_Load handler? For example if a button was clicked can I figure this out before the button_click event handler is called? ...

What is the difference between request, response and server?

What is the difference between request, response and server? ...

request.params item disapearing after postback

I have an asp.net application that has a request item which is disapearing after several postbacks. The postbacks are just for validation and ajax calls. The session is not resetting as I still have ~60 items in the params collection ...

Again a jquery doubt...

I am calling a .txt file from a jquery ajax call, it has some special characters like "±". this ± is delimiter for a set of array...data i want to split it out and push into a js array. but it is not treated as ± symbol when interpreted like this. so how do i get that data as just like browser content? ...

PHP detecting request type (GET, POST, PUT or DELETE)

How can I detect which request type was used(GET, POST, PUT or DELETE) in php? ...

Uri.EscapeDataString(Request.Url.AbsoluteUri) is wrong in different environment, What else should I use?

I am generating a return url link so when the user hits the close button on this page they return to this ReturnUrl. ie http://localhost:42605/Search.aspx?ReturnUrl=http%3A%2F%2Flocalhost%3A42605%2FStuff%2FViewStuff.aspx%3FProjectId%3D2246 This works fine in dev environment, but in uat environment I have http://app-uat.com/Search.aspx...

best way to handle user id hash common to all rails requests

Each client is identified by a hash, passed along with every request to the server. What's the best way to handle tracking a users session in this case? I'm using restful_authentication for user accounts etc. A large percentage of requests are expected to originate without a user account but just the unique hash. My understanding of th...

How do I access query parameters in the request content body in javascript?

If I use a GET to request a page, then I can access any query parameters from javascript using window.location.search. Is there a similar way to access query parameters which are in the request content body rather than the request location, when the page is a result of a POST? ...

Getting the Request Variables from an ASP.NET page

I wrote the following function that works about 95% of the time, but I need it to work 100% (obviously): Public Shared Function getPassedVars() As String Const keyCount As Integer = 54 ' 54 seems to be the number of parameter keys passed by default (for this web_app). ' there are more if there i...

Why can't browser send gzip request?

If webserver can send gzip response, why can't browser sent gzip request? ...

posting file input type to a form

First I must say that my problem happens when I'm trying to post to another form. I have 3 controls in a form: 1. text input named "text1". 2. file input named "file1". 3. submit input. the form itself have a post method to another page. in the page load of the posted page I'm using Request["text1"] which gives me the text of "text1". ...

HTTP GET and POST

Whats the use of HTTP GET method if POST can handle many of the issues of GET? ...