Java HttpURLConnection Create getHttpURLConnection(String strUrl)

Here you can find the source of getHttpURLConnection(String strUrl)

Description

get Http URL Connection

License

Apache License

Declaration

public static HttpURLConnection getHttpURLConnection(String strUrl) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {

    public static HttpURLConnection getHttpURLConnection(String strUrl) throws IOException {
        URL url = new URL(strUrl);
        HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
        return httpURLConnection;
    }/*  www .j av a2  s  . c  o  m*/
}

Related

  1. getHTTPConnection(String urlString)
  2. getHttpConnection(URL url)
  3. getHttpConnection(URL url, int expectedResponseCode, int connectionTimeout)
  4. getHttpURLConnection(@Nonnull String urlStr)
  5. getHttpURLConnection(String postUrl)
  6. getHttpURLConnection(String uri, String soapAction, boolean soap12)
  7. getHttpUrlConnection(String url)
  8. getHttpURLConnection(String urlAsString)
  9. getHttpUrlConnection(String urlStr)