Gets the post response.

@param url        the url
@param attributes the attributes
@return the post response
336812
public static Response getPostResponse(final String url, final Map<String, String> attributes) {
        return new DefaultResponse(ResponseType.POST, url, attributes);
    }
519831
@Override
    public Object getAttribute(String name) {
        if (name == null) {
            logger.logp(Level.SEVERE, CLASS_NAME, "getAttribute", servlet40NLS.getString("name.is.null"));
            throw new java.lang.NullPointerException(servlet40NLS.getString("name.is.null"));
        }

        return super.getAttribute(name);
    }
37170
public RFuture<String> post(String url, String data) {
    return req(url).setPayload(data).execute().map(GET_PAYLOAD);
  }
589377
public static HttpResponse executePost(final String url,
                                           final String basicAuthUsername,
                                           final String basicAuthPassword,
                                           final String entity) {
        return executePost(url, basicAuthUsername, basicAuthPassword, entity, new HashMap<>());
    }
863636
public static String doPost(String url, String ctype, byte[] content, int connectTimeout, int readTimeout) throws IOException {
        return _doPost(url, ctype, content, connectTimeout, readTimeout, null);
    }
1302634
public static HttpResponse doGetResponse(String url) throws Exception {
        return doGetResponse(url, null, null, null);
    }
544572
private RawResponse getResponse(URL url, HttpURLConnection conn, CookieJar cookieJar, String method)
            throws IOException {
        // read result
        int status = conn.getResponseCode();
        String host = url.getHost().toLowerCase();

        String statusLine = null;
        // headers and cookies
        List<Header> headerList = new ArrayList<>();
        List<Cookie> cookies = new ArrayList<>();
        int index = 0;
        while (true) {
            String key = conn.getHeaderFieldKey(index);
            String value = conn.getHeaderField(index);
            if (value == null) {
                break;
            }
            index++;
            //status line
            if (key == null) {
                statusLine = value;
                continue;
            }
            headerList.add(new Header(key, value));
            if (key.equalsIgnoreCase(NAME_SET_COOKIE)) {
                Cookie c = Cookies.parseCookie(value, host, Cookies.calculatePath(url.getPath()));
                if (c != null) {
                    cookies.add(c);
                }
            }
        }
        Headers headers = new Headers(headerList);

        InputStream input;
        try {
            input = conn.getInputStream();
        } catch (IOException e) {
            input = conn.getErrorStream();
        }
        if (input == null) {
            input = InputStreams.empty();
        }

        // update session
        cookieJar.storeCookies(cookies);
        return new RawResponse(method, url.toExternalForm(), status, statusLine == null ? "" : statusLine,
                cookies, headers, input, conn);
    }
789429
public HttpClient get(String url) throws HelloSignException {
        if (postFields != null) {
            logger.warn("POST fields set for a GET request, they will be ignored");
        }
        request = new HttpGetRequest(url, getParams, auth);
        request.execute();
        return this;
    }
412604
public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes)
	{
		return getConnection(jmxUrl, attributes, false);
	}
1043944
private static String fetchHttpResponse(URL url) throws IOException {
      HttpURLConnection conn = null;
      try {
         logger.info("fetching from url = " + url);
         conn = (HttpURLConnection) url.openConnection();
         int response = conn.getResponseCode();
         if (response != HttpURLConnection.HTTP_ACCEPTED) {
            String responseContent = IOUtils.toString(conn.getInputStream());
            logger.info("responseContent = " + responseContent);
            
            return responseContent;
         }
         throw new IOException("response from service not valid");
      } catch (IOException e) {
         logger.severe("unable to do proper http request url = " + url.toString());
         throw e;
      } finally {
         conn.disconnect();
      }

   }
261867
@PostMapping(
      value = "/{entityTypeId}/meta/{attributeName}",
      params = "_method=GET",
      produces = APPLICATION_JSON_VALUE)
  public AttributeResponse retrieveEntityAttributeMetaPost(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("attributeName") String attributeName,
      @Valid @RequestBody EntityTypeRequest request) {
    Set<String> attributeSet = toAttributeSet(request != null ? request.getAttributes() : null);
    Map<String, Set<String>> attributeExpandSet =
        toExpandMap(request != null ? request.getExpand() : null);

    return getAttributePostInternal(entityTypeId, attributeName, attributeSet, attributeExpandSet);
  }
73895
public String simpleGet(String url) throws IOException {
		final AtomicReference<String> str = new AtomicReference<>();
		simpleGetInternal(url, inputStream -> {
            try {
                str.set(IOUtils.toString(inputStream, "UTF-8"));
            } catch (IOException e) {
                throw new IllegalStateException(e);
            }
        }, null);

		return str.get();
	}
608334
public static HttpResponse executePost(final String url,
                                           final String entity,
                                           final Map<String, Object> parameters) {
        return executePost(url, null, null, entity, parameters);
    }
711314
public static String requestUrl(final String url, final String method, final Properties header, final String body) {
		try {
			final URL siteUrl = new URL(url);
			final HttpURLConnection connection = (HttpURLConnection) siteUrl.openConnection();
			connection.setRequestMethod(method);
			final Enumeration<?> keys = header.keys();
			while (keys.hasMoreElements()) {
				final String key = (String) keys.nextElement();
				connection.addRequestProperty(key, header.getProperty(key));
			}
			connection.setDoOutput(true);

			final OutputStream out = connection.getOutputStream();
			out.write(body.getBytes());

			connection.connect();

			final int errorCode = connection.getResponseCode();
			if (errorCode != HttpURLConnection.HTTP_OK) {
				throw new JKHttpException(connection.getResponseMessage(), errorCode);
			}
			final String response = JKIOUtil.convertToString(connection.getInputStream());
			return response;
		} catch (IOException e) {
			throw new JKHttpException(e);
		}
	}
627371
public RequestBuilder get(final String url) {

    checkNotNull(url, "url may not be null");
    final AsyncHttpClient.BoundRequestBuilder ningRequestBuilder = asyncHttpClient.prepareGet(url);
    return createNewRequestBuilder(url, ningRequestBuilder);
  }
1352563
public int get(String url) throws Exception {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
                .url(url)
                .build();
        try(Response response = client.newCall(request).execute()) {
            if (!response.isSuccessful()) {
                throw new Exception("error sending HTTP GET to this URL: " + url);
            }
            return response.code();
        }
    }
1117321
public <T> T performGetRequest(String url, Class<T> returnType, Map<String, String> uriVariables) {

        int tryNumber = 1;
        while(tryNumber <= API_RETRY) {
            try {
                return restTemplate.getForObject(url, returnType, uriVariables);
            } catch (HttpStatusCodeException error) {
                boolean isTooManyRequestsError = handleHttpStatusCodeError(uriVariables, tryNumber, error);
                if (isTooManyRequestsError) {
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        log.error("Error in performGetRequest", e);
                    }
                } else {
                    tryNumber++;
                }
            } catch (Exception e) {
                handleApiError(tryNumber, e);
                tryNumber++;
            }
        }

        throw new RestApiException("Error getting " + returnType.getSimpleName() + " url variables " + uriVariables.toString());

    }