Does the actual HTTP level interaction.
496937
def request(post_body, headers)
      response = @client.post(endpoint, post_body, headers)
      return { :status => response.status, :body => response.content, :content_type => response.contenttype }
    end
166800
def connection_ok():
    
    try:
        urlopen(Dataset.base_url, timeout=1)
        # if an index page is ever added, this will pass through
        return True
    except HTTPError:
        # There's no index for BASE_URL so Error 404 is expected
        return True
    except URLError:
        # This is raised if there is no internet connection
        return False
633546
protected void postProcessHttpRequest(HttpUriRequest httpRequest) {
		HttpParams params = httpRequest.getParams();
		HttpProtocolParams.setUseExpectContinue(params, false);
	}
682502
protected function checkHttps() {
    if (strstr($this->drushStatus['uri'], 'https')) {
      if (!$this->getExecutor()->execute('curl -cacert ' . $this->drushStatus['uri'])->run()->wasSuccessful()) {
        $this->logProblem(__FUNCTION__, [
          "The SSL certificate for your local site appears to be invalid for {$this->drushStatus['uri']}.",
        ], 'error');
      }
    }
  }
693721
public void execute() throws HelloSignException {
        HttpURLConnection connection = getConnection();
        try {
            // Execute the request and save the HTTP status code
            lastHttpStatusCode = connection.getResponseCode();

            // Save the stream object for processing
            if (lastHttpStatusCode >= 200 && lastHttpStatusCode < 300) {
                logger.debug("OK!");
                lastResponseStream = connection.getInputStream();
            } else {
                logger.error("Error! HTTP Code = " + lastHttpStatusCode);
                lastResponseStream = connection.getErrorStream();
            }
        } catch (Exception ex) {
            throw new HelloSignException(ex);
        }
    }
963805
def http_session(self):
        
        if self._http_session is None:
            session = VerboseHTTPSession()
            session.headers.update(self.DEFAULT_HTTP_HEADERS)
            self._http_session = session
        return self._http_session
1209497
function () {
        this.addResult = function (event) {
            var fullUrl = event.homeURL + url;
            http.get(fullUrl, function (response) {
                var content = "";
                response.on("data", function (chunk) {
                    content += chunk;
                });
                response.on("end", function () {
                    callback(content);
                });
            });
        };
        this.checkFinished = function () {
            return false;
        };
        events.EventEmitter.call(this);
    }
1186043
def _load_data(self):
        """"""
        url = urljoin(self.base_url, 'levels')
        resp = requests.get(url, headers=self.headers)
        # TOOD: Confirm/deny that this is a real API for the levels currenlty running...
        if resp.content:
            return resp.json()
        else:
            return None
644695
boolean performRemoteCheck(MnoHttpClient httpClient) {
		// Prepare request
		String url = sso.getSessionCheckUrl(this.uid, this.sessionToken);
		String respStr;
		try {
			respStr = httpClient.get(url);
		} catch (AuthenticationException e1) {
			// TODO log error
			e1.printStackTrace();
			return false;
		} catch (ApiException e1) {
			// TODO log error
			e1.printStackTrace();
			return false;
		}

		// Parse response
		Gson gson = new Gson();
		Type type = new TypeToken<Map<String, String>>() {
		}.getType();
		Map<String, String> respObj = gson.fromJson(respStr, type);
		Boolean isValid = (respObj.get("valid") != null && respObj.get("valid").equals("true"));

		if (isValid) {
			try {
				this.recheck = MnoDateHelper.fromIso8601(respObj.get("recheck"));
			} catch (Exception e) {
				return false;
			}

			return true;
		}
		return false;
	}
673533
def _connect(self):
        """"""
        if sys.version_info[:2] < (2,6):
            self._conn = httplib.HTTPConnection(self._host, self._port)
        else:
            self._conn = httplib.HTTPConnection(self._host, self._port, 
                                                False, defaultTimeout)
1110604
private boolean simulateHttpStatusCode(Message replyMessage) throws IOException {
        if (replyMessage == null || CollectionUtils.isEmpty(replyMessage.getHeaders())) {
            return false;
        }
        
        for (Entry<String, Object> headerEntry : replyMessage.getHeaders().entrySet()) {
            if (headerEntry.getKey().equalsIgnoreCase(SoapMessageHeaders.HTTP_STATUS_CODE)) {
                WebServiceConnection connection = TransportContextHolder.getTransportContext().getConnection();
                
                int statusCode = Integer.valueOf(headerEntry.getValue().toString());
                if (connection instanceof HttpServletConnection) {
                    ((HttpServletConnection)connection).setFault(false);
                    ((HttpServletConnection)connection).getHttpServletResponse().setStatus(statusCode);
                    return true;
                } else {
                    log.warn("Unable to set custom Http status code on connection other than HttpServletConnection (" + connection.getClass().getName() + ")");
                }
            }
        }
        
        return false;
    }
33298
private static void checkResponseCode(URLConnection uc) throws IOException {
        if (uc instanceof HttpURLConnection) {
            HttpURLConnection httpConnection = (HttpURLConnection) uc;
            int rc = httpConnection.getResponseCode();
            if (rc != HttpURLConnection.HTTP_OK && rc != HttpURLConnection.HTTP_MOVED_TEMP) {
                throw new IOException();
            }
        }
    }
1215858
def is_http_running_on(port):
  
  try:
    conn = httplib.HTTPConnection('127.0.0.1:' + str(port))
    conn.connect()
    conn.close()
    return True
  except Exception:
    return False
300147
private boolean isSuccessfulResponseToUnsafeRequest(HTTPResponse resolvedResponse) {
        Status.Category category = resolvedResponse.getStatus().getCategory();
        return category == Status.Category.SUCCESS || category == Status.Category.REDIRECTION;
    }
675358
def do_request(self, request, proxies, timeout, **_):
        """"""
        print('{0} {1}'.format(request.method, request.url))
        response = self.http.send(request, proxies=proxies, timeout=timeout,
                                  allow_redirects=False)
        response.raw = None  # Make pickleable
        return response
125257
def interact(self, ctx, location, ir_err):
        ''''''
        p = ir_err.interaction_method(self.kind(), WebBrowserInteractionInfo)
        if not location.endswith('/'):
            location += '/'
        visit_url = urljoin(location, p.visit_url)
        wait_token_url = urljoin(location, p.wait_token_url)
        self._open_web_browser(visit_url)
        return self._wait_for_token(ctx, wait_token_url)
477422
function onlineMessage() {
			_this.showLogo();

			var httpPort = _this.config.http.port;
			Logger.info('Listening HTTP on port ' + httpPort);

			if(_this.config.https.enabled) {
				var httpsPort = _this.config.https.port;
				Logger.info('Listening HTTPS on port ' + httpsPort);
			}
		}