Hi, I'm sending an image file from an iPhone application to a http Post application. The Post application is a java restful web service that accepts Post requests. I have the Post method receiveing a byte array and then writing it to a file like this:
private void writeToFile(byte[] str) {
String strFilePath = "/Users/j/Desktop/joe.pn...
I want to implement a Java HTTP server locally, I mean the server computer would be in my control. I'm expecting not more than 20 clients to send requests to it.
I was wondering how to go about it:
Should I use a J2EE servlet container, like Apache Tomcat?
Could I use J2SE classes and just build it using them?
Are there any existing al...
Hi,
I have got my android app that uses HttpClient to reach my servlet
deployed on my Tomcat. It is installed on my HTC Magic.
If I launch it when connected on Wifi : it works.
If I launch it when connected to 3G (GSM data network) : it doesn't work but my servlet is reached. In other word, it seems that my phone never get the response...
First, my use case:
I'm trying to use YQL's built in XPATH capabilities to scrape content from Yahoo! Fantasy Sports. It uses some sort of cookie-based authentication scheme. Basically, the sequence is:
1) Do an HTTP GET on the Yahoo! Login page
2) Parse the hidden inputs from the response and do an HTTP PUT with your Yahoo! Login on t...
I'm doing some simple HTTP authentication and am getting a
java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic OGU0ZTc5ODBk(...trimmed from 76 chars...)
(...more password data...)
which I think is due to me having a really long username and password and the encoder wraps it with a \n at 76 chars. I...
Hi.
Currently I've got a web app that retrieves the URL of a mp3 on an external server, but to conserve data I'd like to check first that the page my server is retrieving is actually a redirect, not the actual content (so I can grab the URL of the mp3 and NOT the actual mp3 itself.
The external PHP script requires that json data is ...
I am writing an arduino library to post http request on web.
I am using the String class from http://arduino.cc/en/Tutorial/TextString
My code is behaving strangely when I am referring to my defined string objects after a function call.
Here actually I am trying to get the body of my GET request and removing the http headers from the ...
Evening all. What I am wanting to do is after a user has clicked on a 'buynow' button for paypal, firstly go to a page that stores the items the have bought in a db and then redirect to the paypal payment.
This is what i have:
<?php
if(isset($_POST['cmd']) && isset($_POST['hosted_button_id']) && isset($_POST['diskSpace']) && isset($_P...
I have put this code in my index, to load a new page, and then later 2 secs later, move to my original screen.
With the intention to load a "music_player" and then 2 seconds later, move toward my NORMAL page. Having the player load in a new window. But the code don't work as it should, it just replaces without the "Target="_blank" can't ...
I have a web page whose content I'd like to download into a wxString.
For example, let's say that page is this:
http://www.example.com/mypage.html
And wxString would contain HTML source. In some other languages, say PHP
for example, I would write something like this:
$html = file_get_contents('http://www.example.com/mypage.html');
...
I'm in the process of building a DataSnap Server that functions as WebDAV server and I'm trying to read the request headers when using a DSHTTPService and then modify the response headers.
Can anyone point me in the right direction? I've notice the Trace TDSRequest and TDSResponse are ancestors of TDSRequestIndy and TDSResponseIndy and...
What's a good HTTP library for (desktop Cocoa and) iPhone? Should just have a good interface to the basics like HTTP headers, get/post values (request string creation, URL encoding/decoding), sync and async requests... preferably pure Obj-C implementation. NSURL* is somewhat lacking.
...
I'm trying to optimize the loading time of a website. One of the things I've done is set a far-futures expires header for static content so that they are cached (as described by Yahoo). However, even though they are cached, the browser still sends a request and gets back a 304 (Not Modified) response for that resource.
I realize the 304...
I want to post XML data with cURL. I don't care about forms like said in How do I make a post request with curl.
I want to post XML content to some webservice using cURL command line interface. Something like:
curl -H "text/xml" -d "<XmlContainer xmlns='sads'..." http://myapiurl.com/service.svc/
The above sample however cannot be pro...
I am looking for an HTTP library for C/C++, that handles only the protocol logic, instead of the actual transport mechanism. Libraries I've came across tend to incoperate the entire communication process, which is not what I need.
However, I'm looking for something that's more than merely an HTTP parser. Ideally it would also take care ...
I am downloading a file through Grails, and am recording the fact that this file has been downloaded by this user, with code like:
class MyController {
private void recordTrackDownload() {
def d = new Download(session.user, "/path/to/file")
d.save()
}
def download = {
def f = new File("/path/to/file...
I have a servlet that allows users to download (potentially large) zip files from a web page. If the user clicks on a link to download a zip file, code similar to the following is executed in the servlet:
response.setContentType("application/zip");
response.setHeader("Content-disposition", "attachment; filename=foo.zip");
response.setH...
Hi, I am new to HTTP Post and encounter an strange issue. I have a request object defined as below:
[DataContract(Namespace = "http://Test.com/WCF")]
public class Request
{
[DataMember]
public string CardNumber { get; set; }
[DataMember]
public string CardExpDate { get; set; }
[DataMember]...
I'm trying to collect some stats on some clicking events happening on my webpage.
I figured I would add an onmouse event to the links I want to track, and trigger an ajax call to my tracking php script.
What would be the most efficient way to do that, knowing that I don't expect anything in return, and that things should go on normally...
how can i send message back to the browser or localhost for example if i want to display message called.... This is test in browser.
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
class MyTcpListener
{
public static void Main()
{
try
{
// Set the TcpListener on...