0% found this document useful (0 votes)
59 views

Integrating HTTP and HTTPS Connection - CodeProject

Integrating HTTP and HTTPS

Uploaded by

Mithun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Integrating HTTP and HTTPS Connection - CodeProject

Integrating HTTP and HTTPS

Uploaded by

Mithun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

Sign up for our free weekly Mobile Newsletter. ×

Search for articles, questions, tips

home articles quick answers discussions features community help

Articles » Mobile Development » Android » General


 

Integrating HTTP and HTTPS Connection


Ravindra Kumar Prajapati, 6 Jun 2012

   4.33 (6 votes) Rate this:

In this article I have discussed the procedure to request HTTP and HTTPS requests in android.

Download HttpConnection.zip - 99.9 KB

Introduction  
In this article I have discussed the procedure to request HTTP and HTTPS requests in android. In mobiles, most of applications
based on client server communication through HTTP or HTTPS protocol, so it is
essential for a small or a large sized application that your HTTP module follows the complete object oriented and has a separate
coupled module from other package of application.

Focus in this article is that an only single class handles both types of request (HTTP and HTTPS), normally developers handle the
HTTP and HTTPS in two different classes, but in this in potent interest, I have handled it in a single class. Developer will need to
invoke a class and implement a listener for getting the response as a notification.

Background
Steps involved: 

Hide   Copy Code

String urlString = "HTTP://www.google.com";

List<NameValuePair> requestParameter= new


List<NameValuePair>();

NameValuePair namVaulePair = new


NameValuePair("name","ravindra");

requestParameter .add(namVaulePair);

int reqId = 100;


HTTPHandler handler = new HTTPHandler(urlString, requestParameter,null,reqId);

1 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

Handler.addHTTPListenr(‘reference of that class implement HTTPListener’);


Hdler.sendRequest();

Using the code


There are five classes in this demo project, divided into two packages one is UI package there from you enter URL and tap on
request button and send request.

HTTPHandler: This class handles the request of HTTP:

Hide   Copy Code

HTTPHandler(String urlstring, final List<NameValuePair> requestParameters,final


Hashtable<String, String> header, int reqId)

User: first call the constructor and pass required parameter.

urlStirng: URL for HTTP request for example ‘HTTP://www.google.com’

requestParameters: if request method types is ‘POST’ then user set the  list of parameters in form of NameValuePair
otherwise It should be null if request method type is ‘GET’.

header: it contain the header you want to set in each HTTP request. 
reqId : unique identifier of HTTP request.

getReqID(): it return the unique request id which used in HTTP request.

getURL(): return the URL used in HTTP request.

getResponse(): return the response return by requested server.

getResCode(): it return the HTTP status line. If return 200 then request is successful another wise it fail due to server reason.
Or invalid request by client.

addHTTPListener: add the concrete class which implement the HTTPListener class and override notifyResponse()
for handle response return by server.

sendRequest(): this method execute the HTTP request.


HTTPHandler class code:

Hide   Shrink   Copy Code

package com.brickred.HTTP;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import org.apache.HTTP.HTTPEntity;
import org.apache.HTTP.HTTPResponse;
import org.apache.HTTP.HTTPVersion;
import org.apache.HTTP.NameValuePair;
import org.apache.HTTP.client.ClientProtocolException;
import org.apache.HTTP.client.HTTPClient;
import org.apache.HTTP.client.ResponseHandler;
import org.apache.HTTP.client.entity.UrlEncodedFormEntity;
import org.apache.HTTP.client.methods.HTTPGet;
import org.apache.HTTP.client.methods.HTTPPost;
import org.apache.HTTP.conn.ClientConnectionManager;
import org.apache.HTTP.conn.params.ConnManagerPNames;
import org.apache.HTTP.conn.params.ConnPerRouteBean;
import org.apache.HTTP.conn.scheme.PlainSocketFactory;
import org.apache.HTTP.conn.scheme.Scheme;
import org.apache.HTTP.conn.scheme.SchemeRegistry;

2 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

import org.apache.HTTP.entity.StringEntity;
import org.apache.HTTP.impl.client.DefaultHTTPClient;
import org.apache.HTTP.impl.conn.SingleClientConnManager;
import org.apache.HTTP.params.BasicHTTPParams;
import org.apache.HTTP.params.CoreConnectionPNames;
import org.apache.HTTP.params.HTTPParams;
import org.apache.HTTP.params.HTTPProtocolParams;
import org.apache.HTTP.util.EntityUtils;
import android.content.Context;
import android.util.Log;

public class HTTPHandler {


/**
* refrence of HTTPListener interface
*/
HTTPListner HTTPListener;

/**
* url for example
HTTP://wwww.google.com
*/

String urlstring = "";

/**
* past request parameter items
*/

List<NameValuePair> postRequestParameters = null;


/**
* HTTP unique reqest id
*/
int reqId = 0;
/**
* hold the HTTP response
*/

String resMessage = "No Response Please check Url or it may be HTTPS certificate issue.";

/**
* response code
*/

int resCode = -1;


Hashtable<String, String> header = null;

/**
* @param urlstring
* requested url
* @param requestParameters
* list post parameters if get request then null
* @param header
* list of header
* @param reqId
* url request id
*/
public HTTPHandler(String urlstring,
final List<NameValuePair> requestParameters,
final Hashtable<String, String> header, int reqId) {

this.urlstring = urlstring;
this.postRequestParameters = requestParameters;
this.reqId = reqId;
this.header = header;
}

/**
* @return reqest id for request

3 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

*/

public int getReqId() {


return reqId;
}

/**
* Return requested url
*
* @return
*/
public String getURL() {
return urlstring;
}

/**
* @return the response
*/

public String getResponse() {


return resMessage;
}

/**
* Return Response Code
*
* @return
*/

public int getResCode() {


return resCode;
}

/**
* @param HTTPListener
* add the listener for notify the response
*/

public void addHTTPLisner(HTTPListner HTTPListener) {


this.HTTPListener = HTTPListener;
}

/**
* send the HTTP or HTTPS request
*/

public void sendRequest() {


// TODO Auto-generated method stub
try {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("HTTP", PlainSocketFactory.getSocketFactory(), 80));
schemeRegistry.register(new Scheme("HTTPS", new EasySSLSocketFactory(), 443));
HTTPParams params = new BasicHTTPParams();

params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 50000);
params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30);
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new
ConnPerRouteBean(30));
params.setParameter(HTTPProtocolParams.USE_EXPECT_CONTINUE, false);
HTTPProtocolParams.setVersion(params, HTTPVersion.HTTP_1_1);
ClientConnectionManager cm = new SingleClientConnManager(params, schemeRegistry);

HTTPClient HTTPclient = new DefaultHTTPClient(cm, params);

// DefaultHTTPClient HTTPclient = null;


if (postRequestParameters != null) {// //////// for post request
// POST the envelope

4 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

HTTPPost HTTPpost = new HTTPPost(urlstring);

if (header != null) {
Enumeration enums = header.keys();
while (enums.hasMoreElements()) {
String key = (String) enums.nextElement();
String value = header.get(key);
HTTPpost.addHeader(key, value);
}
}

HTTPpost.setEntity(new UrlEncodedFormEntity(postRequestParameters));
// Response handler
ResponseHandler<String> reshandler = new ResponseHandler<String>() {
// invoked when client receives response
public String handleResponse(HTTPResponse response)

throws ClientProtocolException, IOException {


// get response entity
HTTPEntity entity = response.getEntity();

// get response code


resCode = response.getStatusLine().getStatusCode();

// read the response as byte array


StringBuffer out = new StringBuffer();

byte[] b = EntityUtils.toByteArray(entity);
// write the response byte array to a string buffer
out.append(new String(b, 0, b.length));

return out.toString();
}
};

resMessage = HTTPclient.execute(HTTPpost, reshandler);


// Log.d("", "Response=====" + resMessage);
}
else {// ///////// for get Request
ResponseHandler<String> responsehandler = new ResponseHandler<String>() {
@Override
public String handleResponse(HTTPResponse response)
throws ClientProtocolException, IOException {
// TODO Auto-generated method stub
HTTPEntity entity = response.getEntity();

// get response code


resCode = response.getStatusLine().getStatusCode();

// read the response as byte array


StringBuffer out = new StringBuffer();

byte[] b = EntityUtils.toByteArray(entity);
// write the response byte array to a string buffer
out.append(new String(b, 0, b.length));

return out.toString();
}
};

HTTPGet HTTPget = new HTTPGet(urlstring);


resMessage = HTTPclient.execute(HTTPget, responsehandler);
}

// close the connection


HTTPclient.getConnectionManager().shutdown();
}
catch (Exception e) {

5 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

Log.i("connection Exeception", e.getMessage());


}
finally {
HTTPListener.notifyHTTPRespons(this);
}
}
}

HTTPListener: This listener must be implement and override the single abstract method notifyResponse() for get the
response generated by HTTP request and know the status of request.

Code:

Hide   Copy Code

package com.brickred.HTTP;

/**
* @author ravindrap
* HTTPListener is super class of which set the HTTP or HTTPS request
*/

public interface HTTPListner {


/**
* @param HTTP
* HTTP handler object. when HTTP request is completed then is call in HTTPHandler class
*/

void notifyHTTPRespons(HTTPHandler HTTP);


}

EasySSlSocketFactory: This socket factory class will create the self signed certificate.
Hide   Shrink   Copy Code

package com.testHTTPS;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* HTTP://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import org.apache.HTTP.conn.ConnectTimeoutException;
import org.apache.HTTP.conn.scheme.LayeredSocketFactory;
import org.apache.HTTP.conn.scheme.SocketFactory;
import org.apache.HTTP.params.HTTPConnectionParams;
import org.apache.HTTP.params.HTTPParams;

6 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

/**
* This socket factory will create ssl socket that accepts self signed
* certificate
*
* @author olamy
* @version $Id:
EasySSLSocketFactory.java 765355 2009-04-15 20:59:07Z evenisse

* $
* @since 1.2.3
*/

public class EasySSLSocketFactory implements SocketFactory, LayeredSocketFactory {

private SSLContext sslcontext = null;


private static SSLContext createEasySSLContext() throws IOException {
try {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, new TrustManager[] { new EasyX509TrustManager(null) }, null);
return context;
} catch (Exception e) {
throw new IOException(e.getMessage());
}
}

private SSLContext getSSLContext() throws IOException {


if (this.sslcontext == null) {
this.sslcontext = createEasySSLContext();
}

return this.sslcontext;
}

/**
* @see org.apache.HTTP.conn.scheme.SocketFactory#connectSocket(java.net.Socket,
* java.lang.String, int, java.net.InetAddress, int,
* org.apache.HTTP.params.HTTPParams)
*/

public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int
localPort, HTTPParams params)

throws IOException, UnknownHostException, ConnectTimeoutException {


int connTimeout = HTTPConnectionParams.getConnectionTimeout(params);
int soTimeout = HTTPConnectionParams.getSoTimeout(params);

InetSocketAddress remoteAddress = new InetSocketAddress(host, port);


SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());

if ((localAddress != null) || (localPort > 0)) {


// we need to bind explicitly
if (localPort < 0) {
localPort = 0; // indicates "any"
}
InetSocketAddress isa = new InetSocketAddress(localAddress, localPort);
sslsock.bind(isa);
}
sslsock.connect(remoteAddress, connTimeout);
sslsock.setSoTimeout(soTimeout);
return sslsock;
}

/**
* @see org.apache.HTTP.conn.scheme.SocketFactory#createSocket()
*/

public Socket createSocket() throws IOException {


return getSSLContext().getSocketFactory().createSocket();

7 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

/**
* @see org.apache.HTTP.conn.scheme.SocketFactory#isSecure(java.net.Socket)
*/

public boolean isSecure(Socket socket) throws IllegalArgumentException {


return true;
}

/**
* @see org.apache.HTTP.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,
* java.lang.String, int, boolean)
*/

public Socket createSocket(Socket socket, String host, int port, boolean autoClose)
throws IOException, UnknownHostException {
return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);

//return getSSLContext().getSocketFactory().createSocket();
}

// -------------------------------------------------------------------
// javadoc in org.apache.HTTP.conn.scheme.SocketFactory says :
// Both Object.equals() and Object.hashCode() must be overridden
// for the correct operation of some connection managers
// -------------------------------------------------------------------

public boolean equals(Object obj) {


return ((obj != null) && obj.getClass().equals(EasySSLSocketFactory.class));
}

public int hashCode() {


return EasySSLSocketFactory.class.hashCode();
}
}

Class EasyX509TrustManager code:

package com.brickred.HTTP;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* HTTP://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;

8 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

/**
* @author olamy
* @version $Id:
EasyX509TrustManager.java 765355 2009-04-15 20:59:07Z evenisse $
* @since 1.2.3
*/

public class EasyX509TrustManager


implements X509TrustManager
{
private X509TrustManager standardTrustManager = null;

/**
* Constructor for EasyX509TrustManager.
*/
public EasyX509TrustManager( KeyStore keystore )
throws NoSuchAlgorithmException, KeyStoreException
{
super();
TrustManagerFactory factory = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm() );

factory.init( keystore );
TrustManager[] trustmanagers = factory.getTrustManagers();

if ( trustmanagers.length == 0 )
{
throw new NoSuchAlgorithmException( "no trust manager found" );
}
this.standardTrustManager = (X509TrustManager) trustmanagers[0];
}
/**
* @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[],String authType)
*/

public void checkClientTrusted(X509Certificate[] certificates, String authType )

throws CertificateException
{
standardTrustManager.checkClientTrusted( certificates, authType );
}
/**
* @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[],String authType)
*/
public void checkServerTrusted(X509Certificate[] certificates, String authType )
throws CertificateException
{
if ( ( certificates != null) && ( certificates.length == 1 ) )
{
certificates[0].checkValidity();
}
else
{
standardTrustManager.checkServerTrusted( certificates, authType );
}
}
/**
* @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
*/

public X509Certificate[] getAcceptedIssuers()


{
return this.standardTrustManager.getAcceptedIssuers();
}
}

AndroidManifest.xml
Hide   Copy Code

9 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="HTTP://schemas.android.com/apk/res/android"

package="com.brickred"

android:versionCode="1"

android:versionName="1.0">
<uses-sdk android:minSdkVersion="4" />

<application android:icon="@drawable/icon" android:label="@string/app_name">


<activity android:name="com.brickred.activity.HTTPConnectionApiActivity"

android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

HTTPConnectionApiActivity.java

Hide   Shrink   Copy Code

package com.brickred.activity;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.brickred.R;
import com.brickred.HTTP.HTTPHandler;
import com.brickred.HTTP.HTTPListner;

public class HTTPConnectionApiActivity extends Activity implements HTTPListner{


/** Called when the activity is first created. */
Handler handler = null;
TextView textviewResponse;
ProgressDialog progressDialog;
EditText edtTextUrl = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button buttonClickMe = (Button)findViewById(R.id.btnclick);
textviewResponse= (TextView)findViewById(R.id.txtshow);
edtTextUrl= (EditText)findViewById(R.id.txturl);
handler = new Handler();
progressDialog = new ProgressDialog(this);

buttonClickMe.setOnClickListener(new OnClickListener() {

10 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//Log.i("", msg)
if(edtTextUrl.getText().length() > 0 && edtTextUrl.getText().toString().startsWith("HTTP")){
progressDialog.setMessage("Please wait for response ... ");
progressDialog.show();
new Thread(new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
HTTPHandler handler = new HTTPHandler(edtTextUrl.getText().toString().trim(),null, null, 123);
handler.addHTTPLisner(HTTPConnectionApiActivity.this);
handler.sendRequest();
}
}).start();
}else{
showAlert("Error", "Please enter valid url", null, "Ok");
}

}
});
}

@Override
public void notifyHTTPRespons(final HTTPHandler HTTP) {
// TODO Auto-generated method stub
progressDialog.cancel();
Log.i("Log", "responce == "+HTTP.getResCode());
handler.post(new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
textviewResponse.setText("");
textviewResponse.setText(HTTP.getResponse());
}
});
}
/**
* @param title
* @param Message
* @param NegButton
* @param posButton
*/
private void showAlert(String title,String Message, final String NegButton,
final String posButton) {

AlertDialog.Builder alertBuilder = new Builder(this);


alertBuilder.setTitle(title);
alertBuilder.setMessage(Message);
if (NegButton != null) {
alertBuilder.setNegativeButton(NegButton,
new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {


// TODO Auto-generated method stub

}
});
}
if (posButton != null) {
alertBuilder.setPositiveButton(posButton,
new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {


// TODO Auto-generated method stub

11 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

}
});
}
AlertDialog alert = alertBuilder.create();
alert.show();

}
}

Points of Interest 
Interesting point in this article is user no need to write a difference code for HTTP and HTTPS protocol. User need only just enter
the the URL as per as his/her requirement and send the request and its works on multithreading environment. User can
send multiple request at that same time without waiting the previous  request completion. 

License
This article, along with any associated source code and files, is
licensed under The Code Project Open License (CPOL)

Share
TWITTER FACEBOOK

About the Author


Ravindra Kumar Prajapati
Software Developer (Senior) 3PillarGlobal Inc.
India

No Biography provided

You may also be interested in...


Building Reactive Apps The Offine-First Approach to
Mobile App Development

12 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

Switching Between HTTP and Custom WPF Window with


HTTPS Like A Bigshot Hotshot Windows System Functionality
Restored

Switching Between HTTP and Setting up Ethereum


HTTPS Automatically: Version Blockchain on Azure
2

Comments and Discussions


 

You must Sign In to use this message board.

Search Comments

Spacing Relaxed   Layout Open All   Per page 25     Update

First Prev Next

Help full Gilbert_Sarip 20-Mar-14 2:57 

Thanks for the guide

Sign In · View Thread  

about https VenuGopalSriramadasu 17-Jun-13 1:13 

Very good example... thanks a lot...

Sign In · View Thread  

My vote of 5 RageMage 20-Jun-12 0:04 

Good work. Although there are a few spelling mistakes in the code (no big deal). Here's a 5 and keep up the good
work.

Sign In · View Thread  

Re: My vote of 5 Ravindra Kumar Prajapati 1-Jul-12 2:45 

Hi RageMage thanks for comment.

Sign In · View Thread  

13 of 14 6/7/2018 9:59 AM
Integrating HTTP and HTTPS Connection - CodeProject https://www.codeproject.com/Articles/396027/Integrating-HTTP-and...

Good example Member 4469951 6-Jun-12 22:21 

great job dear keep it up.

Sign In · View Thread  

great work saif_afzal 5-Jun-12 23:13 

good job. this code is very helpful.

Sign In · View Thread  

Code link Lorenzo H. Martín 5-Jun-12 22:40 

Hi,

I think you have forgotten to include the download link for the zip file of the project.

Recently, I have to do this stuff while making the docs of a project of mine. I discovered how helpful is, as an example,
to include a simple file upload and download service using https, with all the EasySSlSocketFactory and
EasyX509TrustManager code as you explain in the article. But also including the simple backend php script to give
feedback of the result of the transfers and moving files to the correspondant directory in the remote server. If you are
interested in extend this article or make another, as a sequel of this, I can provide working code for this. We use this
method as an easy way to make remote updates of the additional app supporting data.

Although you can get this information on several sites on the net I think you made a great work putting all together in
this article. Don't we all love Codeproject articles ? Here you get all you need together in one place.

Good work.

Sign In · View Thread  

Last Visit: 31-Dec-99 18:00     Last Update: 6-Jun-18 17:13 Refresh 1

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin   

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile Layout: fixed | Article Copyright 2012 by Ravindra Kumar Prajapati
Web01 | 2.8.180605.1 | Last Updated 6 Jun 2012 fluid Everything else Copyright © CodeProject, 1999-2018

14 of 14 6/7/2018 9:59 AM

You might also like