// Path: app/src/main/java/org/wordcamp/android/networking/WCHurlStack.java
// public class WCHurlStack implements HttpStack {
// 
// 
//     @Override
//     public HttpResponse performRequest(Request<?> request, Map<String, String> additionalHeaders) throws IOException, AuthFailureError {
// 
//         String url = request.getUrl();
//         HashMap<String, String> map = new HashMap<>();
//         map.putAll(request.getHeaders());
//         map.putAll(additionalHeaders);
// 
// 
//         if(!url.startsWith("https")){
//             url = url.replace("http","https");
//         }
//         URL parsedUrl = new URL(url);
//         HttpURLConnection http = null;
// 
//         if (parsedUrl.getProtocol().toLowerCase().equals("https")) {
//             HttpsURLConnection https = (HttpsURLConnection) parsedUrl.openConnection();
//             http = https;
//         } else {
//             http = (HttpURLConnection) parsedUrl.openConnection();
//         }
// 
// 
//         StatusLine responseStatus = new BasicStatusLine(new ProtocolVersion("HTTP",1,1),
//                 http.getResponseCode(), http.getResponseMessage());
// 
//         BasicHttpResponse response = new BasicHttpResponse(responseStatus);
//         response.setEntity(entityFromConnection(http));
//         return response;
//     }
// 
//     private static HttpEntity entityFromConnection(HttpURLConnection connection) {
//         BasicHttpEntity entity = new BasicHttpEntity();
//         InputStream inputStream;
//         try {
//             inputStream = connection.getInputStream();
//         } catch (IOException ioe) {
//             inputStream = connection.getErrorStream();
//         }
//         entity.setContent(inputStream);
//         entity.setContentLength(connection.getContentLength());
//         entity.setContentEncoding(connection.getContentEncoding());
//         entity.setContentType(connection.getContentType());
//         return entity;
//     }
// }


import org.wordcamp.android.networking.WCHurlStack;
import android.app.Application;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
package org.wordcamp.android;





public class WordCampApplication extends Application {

    public static RequestQueue requestQueue;

    @Override
    public void onCreate() {
        super.onCreate();
// Path: app/src/main/java/org/wordcamp/android/networking/WCHurlStack.java
// public class WCHurlStack implements HttpStack {
// 
// 
//     @Override
//     public HttpResponse performRequest(Request<?> request, Map<String, String> additionalHeaders) throws IOException, AuthFailureError {
// 
//         String url = request.getUrl();
//         HashMap<String, String> map = new HashMap<>();
//         map.putAll(request.getHeaders());
//         map.putAll(additionalHeaders);
// 
// 
//         if(!url.startsWith("https")){
//             url = url.replace("http","https");
//         }
//         URL parsedUrl = new URL(url);
//         HttpURLConnection http = null;
// 
//         if (parsedUrl.getProtocol().toLowerCase().equals("https")) {
//             HttpsURLConnection https = (HttpsURLConnection) parsedUrl.openConnection();
//             http = https;
//         } else {
//             http = (HttpURLConnection) parsedUrl.openConnection();
//         }
// 
// 
//         StatusLine responseStatus = new BasicStatusLine(new ProtocolVersion("HTTP",1,1),
//                 http.getResponseCode(), http.getResponseMessage());
// 
//         BasicHttpResponse response = new BasicHttpResponse(responseStatus);
//         response.setEntity(entityFromConnection(http));
//         return response;
//     }
// 
//     private static HttpEntity entityFromConnection(HttpURLConnection connection) {
//         BasicHttpEntity entity = new BasicHttpEntity();
//         InputStream inputStream;
//         try {
//             inputStream = connection.getInputStream();
//         } catch (IOException ioe) {
//             inputStream = connection.getErrorStream();
//         }
//         entity.setContent(inputStream);
//         entity.setContentLength(connection.getContentLength());
//         entity.setContentEncoding(connection.getContentEncoding());
//         entity.setContentType(connection.getContentType());
//         return entity;
//     }
// }


// Path: app/src/main/java/org/wordcamp/android/WordCampApplication.java
import org.wordcamp.android.networking.WCHurlStack;
import android.app.Application;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

package org.wordcamp.android;





public class WordCampApplication extends Application {

    public static RequestQueue requestQueue;

    @Override
    public void onCreate() {
        super.onCreate();
        requestQueue = Volley.newRequestQueue(this,new WCHurlStack());