I've been investigating what I can do with Google's Secure Data Connector and App Engine.
Is it possible, from an App Engine application, to grab resources inside my corporate intranet without using HTTP(S)?
From what I read in the documentation, the only way to request resources through SDC is by using url_fetch, which is limited to HTTP, right?
How can I write a test to assert that the action new is rendered?
def method
...
render :action => :new
end
I'm looking for something like:
assert_equal layout, @response.layout
assert_equal format, @request.format
I know I can't do @response.action
Thanks in advance!
Deb
I am trying to do the equivalent of the following curl command :
curl -H "Accept: text/plain" http://127.0.0.1:8033/stats
I tried with an Inets simple http request. But, it isn't processed.
How can I specify in Inets (or some other Erlang http client for that matter) the accept header requirement?
I am adding twitter oauth login to my site . and so far i got it to work using oauth.
however every time i login i go through the whole authorization process. ( the prompt that allows the user to request or deny the application)
is there a way to by pass that once the user has authorized the app?
Perhaps i am misunderstanding the process also if so could you please clarify?
thank you
I want to redirect to another page using Server.Transfer and I have this simple code:
if (Page.IsPostBack)
{
try
{
Server.Transfer("AnotherPage.aspx");
}
catch (Exception)
{
throw ;
}
}
But I'm getting an error: "Error executing child request for AnotherPage.aspx.". Could not find the solution on the net.
Just to mention, Response.Redirect works flawlessly.
I am creating EML file with "System.Net.Mail".After that i am migrating it to Google Mail using google API ver 2.
For small attachments it is working fine.
But in case of large attachment upto (1 MB or 2 MB) it throwing exception "Request aborted".
How can migrate mail with large file attachment?
I got solution of sending large size attachment using System.Net.Mail.
But how to implement it in case of Google apps?
Thanx
i m using phptube class for downloading you tube video.
from this site
In code i paste youtube url on a input box but there is errors below.
Warning: file_get_contents(http://www.youtube.com/get_video?video_id=&t=)
[function.file-get-contents]: failed to open stream: HTTP request failed!
HTTP/1.0 404 Not Found
and
Warning: file_put_contents(./flvs/3Hx9VsqMUug.flv) [function.file-put-contents]:
failed to open stream: No such file or directory in E:\xampp\htdocs\vdo\utube
\functions.php on line 19
path:./flvs/3Hx9VsqMUug.flv
please tell me where is problem???
How do i authenicate users with SOAP ?
Will i have the user require to send his username/pass with every SOAP request and i authenticate him against the database ?
Doesn't that seem to cause unnecessary queries ?
Hello, this is quite a simple question hopefully.
Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to scrap flash and use JavaScript and jQuery. Now, as long as the XML file is at a readable URL I should be able make an AJAX request for the file and use it. Is that correct?
Many thanks
When processing a POST request in the Django views.py file, I sometimes need to redirect it to another url. This url I'm redirecting to is handled by another function in the same Django views.py file. Is there a way of doing this and maintaining the original POST data?
If I accept a file from a MultipartRequest and call
File f = request.getFile("fileName");
Is the file written to disk (as a temp file) or is it only stored in memory at this point?
I want a simple client that takes a few parameters (Method, URL, Parameters), makes an HTTP request, and shows me the results that were returned.
A browser obviously can easily send GET and POST requests, but I have no good ideas on DELETE and UPDATE.
Did I miss something in browser 101, or is there a common freeware tool to do this? I've seen other threads that give me Java APIs for a simple client, but that's not what I'm looking for.
In a pylons controller, I would like to first return the response to the request (so that the user gets a response ASAP), and then perform some additional operations (say, updating view counts, etc.) that didn't need to happen to generate the response. What's the best-practice for doing things like this?
Thanks!
Is it possible to mention both form-based and basic authentication in Spring security using namespace configuration without overriding other ? So that the appliciation could serve both browser based request and remoting client.
Hi,
I'm looking for an HTTP Proxy/GUI combination that should be installed locally on my Windows PC. The UI should display something similar to Firebugs "Network" tab, showing request/response headers and content as plaintext.
It would be cool if I could attach requests to a sort of node for later comparison, similar to what you can do when using the Proxy that comes with JMeter.
The prevailing wisdom in webservices/web requests in general is to design your api such that you use as few requests as possible, and that each request returns therefore as much data as is needed
In database design, the accepted wisdom is to design your queries to minimise size over the network, as opposed to minimizing the number of queries.
They are both remote calls, so what gives?
I have to write an link with an image inside. Instead of explaining, here's the code I have now:
<c:if test="${userSession.loggedUser eq null and company.image != null}">
<a onclick="${rich:component('loginPanel')}.show()">
<img src="/download.do?hash=#{company.image.hash}" />
</a>
</c:if>
<c:if test="${userSession.loggedUser eq null and company.image == null}">
<a onclick="${rich:component('loginPanel')}.show()">
<img src="${request.contextPath}/img/icons/logo_default.jpg" />
</a>
</c:if>
<c:if test="${userSession.loggedUser ne null and company.image != null}">
<a href="company.xhtml?${company.name}">
<img src="/download.do?hash=#{company.image.hash}" />
</a>
</c:if>
<c:if test="#{userSession.loggedUser ne null and company.image == null}">
<a href="company.xhtml?${company.name}">
<img src="${request.contextPath}/img/icons/logo_default.jpg" />
</a>
</c:if>
This code looks awful - there are two exact links with two exact images but combined in all possible combinations. Is there a better way?
Is there a way to avoid c:if - it created tables?
Update: Bozho proposes:
You can replace <c:if and <a with <h:outputLink rendered="#{..}". Apart from that I don't see any other optimization.
But it doesn't work. This does not render correctly:
<a href=>
<h:outputLink rendered="#{..}
<h:outputLink rendered="#{..}
</a>
(the image is outside the anchor)
This does render fine:
<h:outputLink value=>
<h:outputLink rendered="#{..}
<h:outputLink rendered="#{..}
</a>
, but it always adds href and in two of the cases I don't want href when rendered.
I want to redirect a praticular subdomain to the main domain
http(s)://dl.example.com/par1/par2 to http(s)://www.example.com/par1/par2
How to achieve the above using .htaccess
Why i want to do this:
Whenever any user download a file from my server, if the file is huge , then user cannot do any other operation until the file is downloaded completely...so the solution that i have thought is to forward the download request through subdomain so that the browser may continue with rest of the operation.
Thanks
According to the C++0x final draft, there's no way to request a thread to terminate. That said, if required we need to implement a do-it-yourself solution.
In your opinion, what's the best solution? Designing your own cooperative 'interruption mechanism' or going native?
Hi i am new to iphone developement , can any one explain me , why setDelegate is used, where we should use it.
[request setDelegate:sender];
thanks in advance.
I'm trying to download the contents of a web page using PHP.
When I issue the command:
$f = file_get_contents("http://mobile.mybustracker.co.uk/mobile.php?searchMode=2");
It returns a page that reports that the server is down. Yet when I paste the same URL into my browser I get the expected page.
Does anyone have any idea what's causing this? Does file_get_contents transmit any headers that differentiate it from a browser request?
When processing a POST request in the Django views.py file, I sometimes need to redirect it to another url. This url I'm redirecting to is handled by another function in the same Django views.py file. Is there a way of doing this and maintaining the original POST data?
Hi,
I have over 2000 HTML files that are now in Wordpress blog. I have the URL Map of Old_file.html and new wordpress URL.
I want 301 redirect but don't want to add 2000 lines to htaccess. Can you please suggest how to accomplish this using PHP so that when there is a request for old url, the php script should lookup into the database and redirect(301) to the new URL ?
Thanks.
In the initial part of the openid sequence, I request the OP (e.g. Yahoo.com) and get back the XRDS file which tells me the actual URL I need to use for the rest of the openid process. So, can I cache this initial file. E.g. if I have hundreds of users using a Yahoo openid, I would only have to do the initial fetch once every hour?