response

JQuery.ajax success function returns empty

I have a very basic AJAX function in JQuery: $.ajax({ url: "http://www.google.com", dataType: "html", success: function(data) { alert(data); } }); But the data is always an empty string, no matter what url I go to... Why is that? I am running this locally at http://localhost:3000, and am using JQuery 1.4.2. ...

ajax upload cannot process JSON response or gives download popup

I'm using the AJAX plugin from Andris Valums: AJAX Upload ( http://valums.com/ajax-upload/ ) Copyright (c) Andris Valums It works great, except for the fact that I cannot send proper JSON as a response. I'm setting the headers to 'Content-Type', 'application/json' before sending the JSON-encoded response, and in the plugin I'm sayi...

Jetty servlet respons to Ajax always empty

Hi I try to run a java server on Jetty which should respond to an ajax call. Unfortunately the response seems to be empty when I call it with ajax. When I call http://localhost:8081/?id=something I get an answer. The Java Server: public class Answer extends AbstractHandler { public void handle(String target, ...

Groovy Grails, How do you stream or buffer a large file in a Controller's response?

Hi Guys I have a controller that makes a connection to a url to retrieve a csv file. I am able to send the file in the response using the following code, this works fine. def fileURL = "www.mysite.com/input.csv" def thisUrl = new URL(fileURL); def connection = thisUrl.openConnection(); def output = connection.content.t...

Hot to get custom http-header in asp.net?

I have an asp.net appliction on the one server. There I've added code on server-side in Page_Load: Response.AddHeader("key", "password-key-from-hotel"); On the client side I have a form: <form ... action="www.link-to-another-domaint" > <input type="hidden" id="asd" value="fgh" > .... </form> <script type="text/javascript"> ...

PHP: How to check for response code?

Hi, I'm a relative PHP newbie implementing a PayPal IPN listener and all seems to be working fine, except I dont really know how to check for a response code. I've tried something ugly with cURL but it doesn't work at all (I'm not understanding cURL). I've tried this piece of code that I grabbed from somewhere on the net: $fp = fsock...

best tool for monitoring incoming/outgoing requests (PC/MAC)?

What are the best tools for monitoring incoming/outgoing requests from a PC or MAC? Any tool that works well on both? (my guess is N/A) I'm interested in capturing HTTP (possibly even TCPIP)-based requests and responses. Does Wireshark always come out on top or are there alternatives people feel are better? Thanks for any info. ...

SD card initialization using SPI interface

I get invalid response Codes from my SD Card(CMD8, CMD55, CMD41) Init routine: SDCS = 1; // MMC deaktiviert SPI1CON1bits.SMP = 0; SPI1CON1bits.CKE = 1; SPI1CON1bits.MSTEN = 1; SPI1CON1bits.CKP = 0; SPI1STATbits.SPIEN = 1; for(i=0;i<10;i++) SPI(0xFF); // RESET unsigned char rr=Command(CMD0,0); SDCS=1; // MMC de...

How can I get the http response body before sending to the browser?

Is there any way I can get the body of a Response object back before it's sent down to the browser? I'd like to do something on Page_LoadComplete to get the current response of what's about to be written to the page so I can do something with it. ...

JSF 2 Scriptmanager style functionality

I need to be able to add some javascript to all ajax postback responses (PartialViewContext.isAjaxRequest == true) but I am not succeeding with any implementation I try. I have tried implementing a PhaseListener and adding my script using PartialResponseWriter.insert* to add eval blocks, as well as trying to add the script by creatin...

Detecting a response from an api

I am currently working with an API, currently the sequence of events is I send an XML request to the api provider and it responds with a response in the format of some XML also, I was hoping there would be a way for me to detect when this reponse is sent back so I can show the user a loading message while the response is sent. Ideally I ...

Creating .ics file from code sometimes gives "The file <filename>[<index>].ics" is not a valid internet Calendar file

Hi! I am building an ASP site where I use response.write to create an ics file where a user can choose open or save dialog for the event. When the user chooses open, Outlook sometimes gives the error "The file [].ics" is not a valid internet Calendar file". It is always the same event that is written to the response. The code looks like ...

Check server response in javascript.

I want to check server response in javascript. For example I have a server A which will host the script. On excuting the script it will check if the server B is responding or not. If yest continue other wise redirect to server C. Is this possible with Javascript/Jquery? If not what could be a possible solution in PHP? ...

What is httpContext.Response.SubStatusCode for?

What is httpContext.Response.SubStatusCode for? this value is part of the IIS integration mode pipeline. ...

asp.net dynamic HTML form

Hi, I want to create an html page inside a asp.net page using c# and then request that html page. The flow is, I'll be creating a request that will give me a response with some values. Those values will be stored in hidden fields in the html page I'm creating on the fly and then requesting. I figure it would be something like below but I...

response redirect with '+'

when I write Response.Redirect("Default2.aspx?Name=" + TextBox1.Text); then string input = Request.QueryString["Name"]; if I write yahoo+music in textbox the input will be yahoo music why ? and how can I keep the '+' ? ...

SKProductsRequest delegate methods are never called.

This used to work for me but is now not working anymore and I can't figure out why. I have in-app purchase setup in my app. I confirmed that I have a correct set of product identifiers, matched by corresponding in-app purchase items in itunesconnect. The call goes out to Apple view [productRequest start], but I never get a response ba...

I get error when trying to write response stream to a file

I am trying to test a rest webservice but when I do a post and try to retreive the save the response stream to a file I get an exception saying "Stream was not readable." What am I doing wrong? Public Sub PostAndRead() Dim flReader As FileStream = New FileStream("~\testRequest.xml", FileMode.Open, FileAccess.Read) Dim flWriter A...

How to handle SOAP response in FLEX 3

SOAP Request<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt; <S:Header/> <S:Body> <ns2:deleteDataView xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"&gt; <identifier>5</identifier> </ns2:deleteDataView> &lt;/S:Body&gt; </S:Envelope> SOAP Respons...

response.sendRedirect - check redirect is up

From JSP I just want a redirect to another page... <% response.sendRedirect("http://www.google.com/"); %> Can I check if google.com is up and then redirect (or write a msg else)... Something like that: <% if(ping("www.google.com")) { response.sendRedirect("http://www.google.com/"); } else { // write a message }%> Or <%...