Hi Everybody,
I create an application of user registration. When user registers in the application, I want to save the user data on an HTTP server. How can I do this?
Thanks Deepak Kumar
Hi Everybody,
I create an application of user registration. When user registers in the application, I want to save the user data on an HTTP server. How can I do this?
Thanks Deepak Kumar
You can store data on a remote server using networking. One example in this article.
Example of how to store a file on a remote server (from the article above):
File f = new File("/path/fileToUpload.txt");
HttpRequest request = new HttpRequest("http://host/some_path");
Part[] parts = {
new StringPart("param_name", "value"),
new FilePart(f.getName(), f)
};
filePost.setEntity( new MultipartRequestEntity(parts, filePost.getParams()) );
HttpClient client = new HttpClient();
int status = client.executeMethod(filePost);