request

Access the request XML in a SOAP UI mock response script

Hello, I have a mock response, which needs to return a value that was in the request. For example, this request can come in: <myReqest><myValue>123</myValue></myRequest> I already have a mockResponse: <myResponse><yourValue>${theValue}</yourValue></myResponse> I know how to set the value of ${theValue} through the context variable...

Java: Display request of an HttpURLConnection before sending

Hey guys, I want to make some API calls to a server and Im using HttpURLConnection to do so. But the request are not successfull but return <error> <http_status>400 Bad Request</http_status> <message>Unexpected request Content-Type header ''. Expecting 'application/x-www-form-urlencoded'.</message> </error> So I want to check wha...

Ajax.Request apparently not evaluating JS code

Hi, I am creating a report, both the interface for the report parameters and the report itself is created by the exact same php file. This are the first lines of the part of the file called when the report is being created: <script type="text/javascript">alert("bla");</script> Whenever I use this code to pull the report new Ajax.Up...

How to bind a TableViewer to a java.util.List in Eclipse RCP

I'm trying to bind a TableViewer to a models = List<ModelObject> , but I don't really get the hang of it. The binding should be possible via master-detail and a databinding context (DataBindingContext), so that I'm able to write the changes of the list (and its elements) to the model only on request (dbc being set to POLICY_ON_REQUES...

Get the route informations from a Zend_Controller_Request

I am trying to get the routing information from a random URL (part of my application). I tried to instantiate a Zend_Controller_Request_Http with an URL but it didn't fill in the controller, module, action fields automatically. I suppose it should somehow be linked to the Route info but cannot figure how to connect this. Any leads? ...

Checkbox Array Values in $_REQUEST but not $_POST

For some reason my checkbox array values don't show up in $_POST. For example: <form method="post" action=""> <input type="checkbox" name="cb[]" value="1"> <input type="checkbox" name="cb[]" checked="checked" value="2"> <input type="checkbox" name="cb[]" value="3"> <input type="checkbox" name="cb[]" checked="checked" va...

How can I access Closure JavaScript minifier using Perl's LWP::UserAgent?

Hi. I'm trying to get Code Closure to work, but unfortunately, there's always an error thrown. Here's the code: use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Response; my $name = 'test.js'; my $agent = new LWP::UserAgent(); $agent->agent("curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1....

Django request.META

If I want to display more than one item of the request.META dictionary: how can I put e.g. two in this string format: def myurl(request): return HttpResponse("You are %s" % request.META['USER'], "Your IP Adress is " % request.META['REMOTE_ADDR']) does not work. Any ideas how I can display/extract selective items of that dicti...

Django request.META 2

I understand everything from this code: def display_meta(request): values = request.META.items() values.sort() html = [] for k, v in values: html.append('<tr><td>%s</td><td>%s</td></tr>' % (k, v)) return HttpResponse('<table>%s</table>' % '\n'.join(html)) Except this line: '\n'.join(html) So \n creates a ...

Django request.GET

It seems I cant make this example print "You submitted nothing!". Everytime I submit an empty form it says: You submitted: u'' instead of: You submitted nothing! Where did I go wrong? views.py def search(request): if 'q' in request.GET: message = 'You submitted: %r' % request.GET['q'] else: message = 'You su...

Getting a non-selected radio buttons from request in servlet Java

It may seem strange, but I need to get values of non-selected radio buttons for each radio button's group. I have used the code below to get all the selected buttons values, but I need to get the unselected ones. ArrayList <String> userSelection = new ArrayList <String>(); Enumeration names = request.getParameterNames();...

ASP.NET MVC redirect dilemma on Application_AuthenticateRequest

I would like my MVC application to check (on every request) if the current user has a profile. If no profile is found, I want to redirect them to the "profile" page for them to submit one. protected void Application_AuthenticateRequest() { if (HttpContext.Current.User != null) { // Redirect to profile...

PHP _REQUEST redirect?

I am reading a script but am stuck on understanding this: $redirect = base64_decode($_REQUEST['redirect']); header("Location:$redirect");exit; because the redirect variable in REQUEST isn't defined anywhere in the script. Prior to this a POST form has been filled in, but there is NO mention of the redirect variable anywhere in the scr...

IIS 7 Log Request Body

I need to log the request post payload for requests made to IIS. Is this possible to configure the logging of request post payloads with the existing logging and advanced logging modules within IIS 7.5 or can anybody direct me to any custom modules that will allow me to log the post payload. Regards David ...

get the values of the fields in a form in an android webview android

Hi I have used HTML/CSS/js to make UI for my android app. (port from iPhone app) One of the HTMLs contains a form. I need to get the values entered in that form and use them in android code. the target of the form is the page itself and the method is GET. How can i get the values entered by the user in that form? ...

android httprequest java.net.UnknownHostException

Hi, I want to make a http request with android. is use this: void testHTTP() { HttpClient httpClient = new DefaultHttpClient(); HttpUriRequest request = new HttpPost("http://www.google.com"); try { HttpResponse response = httpClient.execute(request); //System.out.println("response protocol version: " + response.getPro...

Continuous request with jQuery

Hi, After using Meebo I noticed that they had a nice little system for continually getting information from the server. They have 1 single request running, and they continually monitor the response as it's "loading". I was wondering if there was a way to do this with jQuery. If not, can someone give me some recommendations on where to ...

How do you directly write to a request body in Python

I am currently implementing code to call out to an API where the post request body needs to contain several columns of data in csv format. e.g. Col1, Col2, Col3 1, 2, 3 4, 5, 6 etc, with the content type header is set to 'text/csv' How do I directly write to the request body? I have a coworker who is doing the same thing as I am...

Facebook android-accept request

Is there any way that we can accept/ignore a request invitation from facebook android sdk? I only can find how to attend/declined event invitation. /EVENT_ID/attending /EVENT_ID/maybe /EVENT_ID/declined how about the other request, like friend request, or request to join application? Thank you very much. Best Regards, Eve ...

PHP $_POST, $_GET, and $_REQUEST keys

Is there ever a case (like some quirky browser) where a form input field's id becomes the key in $_POST, $_GET or $_REQUEST, instead of the field's name? We were having trouble with a field where the ID didn't match the name. Changing the ID to match appeared to fix the problem. The issue was purely PHP parsing; no JS involved. Coinci...