request

ZF:How to access controller's Request object within Form method?

How to access Request object within Form method? I assume it's somehow possible to access controller's request object using ActionHelper inside Form methods, but writing a new class for such a task seems to be excessive. Or should I somehow save controller's Request to Zend_Registry and access Registry item in Form? ...

Creating URL query parameters from NSDictionary objects in ObjectiveC

With all the URL-handling objects lying around in the standard Cocoa libraries (NSURL, NSMutableURL, NSMutableURLRequest, etc), I know I must be overlooking an easy way to programmatically compose a GET request. Currently I'm manually appending "?" followed by name value pairs joined by "&", but all of my name and value pairs need to be...

What's the funniest user request you've ever had?

Users sometimes come up with the most amusing, weird and wonderful requirements for programmers to design and implement. Today I read a memo from my boss that we need the "ability to import any excel or access data, irrespective of size, easily and quickly." From the same memo, we have a requirement to "know if anyone unauthorized acce...

Django Admin: How to access the request object in admin.py, for list_display methods?

I've added a method 'highlight_link' to my model's admin.py class: class RadioGridAdmin(admin.ModelAdmin): list_display = ('start_time', highlight_link) def highlight_link(self): return ('some custom link') admin.site.register(RadioGrid, RadioGridAdmin) It returns a custom link for (I've left out highlight_link.short_...

Get the exact url the user typed into the browser.

Hello, I would like to get the exact url that user typed into the browser. Of course I could always use something like Request.Url.ToString() but this does not give me what i want in the following situation: http://www.mysite.com/rss With the url above what Request.Url.ToString() would give me is: http://www.mysite.com/rss/Default.as...

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...

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) ...

Invalid page redirection

Hello, I'm making a request for a page (lets call it page A). However, the request gets redirected to another page (page B). As soon as the request handling starts, URL property of Request object on the server points to page B (however, RawURL still points to page A). I am not able to find any piece of code in the applications that e...

ASP.NET Request - Can I get a posted file from a dynamic control created on client?

Hello, I have a web control with some custom javascript. The javascript creates new file upload controls on the client dynamically using code similar to: var newFileUpload = document.createElement('input'); newFileUpload.type = 'file'; container.appendChild(newFileUpload); // where container is a div This exists in an ASP.NET form wi...

Synchronous GET request with YUI 2.7?

hi, i'm relatively new to YUI - browsing their great docs, i do not find a method or a flag to load an external resource synchronously. or the question the other way around; for each matched node i need to call a method, which inserts something at the node; with asynchronous calls the remembered identifiers seem to mess up. therefore...

Intercepting requests made by WebBrowser in C#

Is it possible to intercept all requests made by a WebBrowser control? I want to modify the request URI of every single request (including requests for images, scripts, stylesheets, etc.) ...

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...

Raw SOAP data with WebServices in C#

Hi, Where can I find the RAW/object data of a SOAP request in C# when using WebServices. Can't find it anywhere. Shouldent it be available in the HttpContext.Current.Request object ? ...

GETing different Active Resource models in a single request

Hi! Is it possible to receive objects of different Active Resource models in a single request? For example the request "GET /user/joe/articles/1.xml HTTP/1.1" returns an object from User ("joe") and another object from Article (id "1") from the server. I know it is possible to send these objects inside an array to the client, but ARes ...

Query URL for Log In Status, javascript

This may seem like a no-brainer, but I can't find a way to do this that isn't considered a security issue (other than the obvious ways)... So, I want to build an add-on for Firefox to use with my team. Basically it will be a status bar icon letting us know if the authentication cookie for our tools site has expired, so we can tell witho...

How to get request parameter to an array in Java, in the style of PHP and Rails?

The situation is as follows: page.jsp?var[0]=foo&var[1]=bar How can this be retrieved in an array in Java? The following: page.jsp?var=foo&var=bar I know can be retrieved using request.getParameterValues("var") Any solutions for the above though? ...

JavaScript & JSP

Hi there, Firstly, I have done my research and already know that JavaScript = client JSPs = server side. I don't want to waste your time. My situation is that I want to execute JSP code from an event (not from a HTML form). I have a HTML link (<a href="...">XXX</a>), which is NOT within <form> tags; it just an ordinary HTML link. Thro...

How to dump the whole POST data to a file in ASP.NET

hi ! I'm currently trying to port an app from asp.net to php, however I just hit a wall and need a hand with this. I need to dump all the data an .aspx recieves via POST to a file, but I have no clue on how to do this any ideas ? thanks in advance! ...

BizTalk HTTPReceive request response with BTSHTTPReceive.dll?ReqResp

I've started to try out BizUnit and noticed that the Http Request Response have a URL of BTSHTTPReceive.dll?ReqResp I can't find anything in the doc's about using the ?ReqResp Is this needed?, or does it add some value? ...

What is the equivalent to ASP.NET's HttpContext.Current.Items in Classic ASP?

The title says it all really, but to clarify what HttpContext.Current.Items is, it's a store that has a life span of the HTTP request. I'd like to know the Classic ASP equivalent of this. ...