Performs an HTTP PUT on the given URL.
(without BasicAuth)

@param uriString   String representing the URI to connect to
@param body
@param contentType
@return
@throws URISyntaxException
@throws HttpException
3308
public static Response put(String uriString, String body, ContentType contentType) throws URISyntaxException, HttpException {
        return putBody(new HttpPut(uriString), body, contentType, null, null);
    }
806486
@Override
	protected boolean copyRequestedContentToResponse(String requestedPath, HttpServletResponse response,
			String contentType) throws IOException {

		boolean copyDone = false;
		if (isValidRequestedPath(requestedPath)) {

			try {
				writeContent(requestedPath, null, response);
				response.setContentType(contentType);
				copyDone = true;
			} catch (ResourceNotFoundException e) {
				// Nothing to do here
			}
		}

		return copyDone;
	}
988874
public String doPost(String url, String body) throws IOException {
        HttpPost httpPost = new HttpPost(getWsapiUrl() + url);
        httpPost.setEntity(new StringEntity(body, "utf-8"));
        return doRequest(httpPost);
    }
522028
public static String put(String url, String body) {
        return request(HttpRequest.put(replaceLocalHost(url)), body).body();
    }
1254292
public void put(URI uri, String mimetype, byte[] content,
			Credentials credentials) throws IOException {
		put(uri, mimetype, content, null, credentials);
	}
652598
public int sendRequest(final String methodName,
                         final String url,
                         final List<Header> hdrs,
                         final String contentType, final int contentLen,
                         final byte[] content) throws HttpException {
    int sz = 0;
    if (content != null) {
      sz = content.length;
    }

    if (debug()) {
      debug("About to send request: method=" + methodName +
                    " url=" + url +
                    " contentLen=" + contentLen +
                    " content.length=" + sz +
                    " contentType=" + contentType);
    }

    try {
      URI u = new URI(url);

      if (!hostSpecified && (u.getHost() == null)) {
        if ((baseURI == null) && (baseURIValue != null)) {
          baseURI = new URI(baseURIValue);
        }

        if (baseURI == null) {
          throw new HttpException("No base URI specified for non-absolute URI " + url);
        }

        if (baseURI.getHost() == null) {
          throw new HttpException("Base URI must be absolute: " + baseURI);
        }

        u = baseURI.resolve(u);
      }

      if (debug()) {
        debug("      url resolves to " + u);
      }

      method = findMethod(methodName, u);

      if (credentials != null) {
        getCredentialsProvider().setCredentials(new AuthScope(u.getHost(),
                                                              u.getPort()),
                                                credentials);
      }

      if (!Util.isEmpty(hdrs)) {
        for (final Header hdr: hdrs) {
          method.addHeader(hdr);
        }
      }

      if (method instanceof HttpEntityEnclosingRequestBase) {
        if (content != null) {
          if (contentType == null) {
            setContent(content, "text/xml");
          } else {
            setContent(content, contentType);
          }
        }
      }

      response = execute(method);
    } catch (final HttpException he) {
      throw he;
    } catch (final Throwable t) {
      throw new HttpException(t.getLocalizedMessage(), t);
    }
    status = response.getStatusLine().getStatusCode();

    return status;
  }
103321
public void setContent(final byte[] content,
                         final String contentType) throws HttpException {
    if (!(method instanceof HttpEntityEnclosingRequestBase)) {
      throw new HttpException("Invalid operation for method " +
                               method.getMethod());
    }

    final HttpEntityEnclosingRequestBase eem = (HttpEntityEnclosingRequestBase)method;

    ByteArrayEntity entity = new ByteArrayEntity(content);
    entity.setContentType(contentType);
    eem.setEntity(entity);
  }
716956
public HttpRequestBuilder withContent(String type, String content) {
    return withContent(type, content.getBytes(StandardCharsets.UTF_8));
  }
758047
public static Response get(String url) throws URISyntaxException, HttpException {
        return send(new HttpGet(url), null, null);
    }
1023288
public void put(URI uri, String mimetype, String content,
			Header[] additionalRequestHeaders, Credentials credentials) {
		ra.getExecutorService().execute(
				new AsyncPutStringContentHandler(ra, handle, uri, mimetype,
						content, additionalRequestHeaders, credentials));
	}
1030627
public static String post(String url, Map<String, String> body) {
        return post(url, JSONObject.toJSONString(body));
    }
506011
public void upload(final String uri, final File sourceFile, final String contentType)
            throws IOException, AppPlatformException {
        final String path = getPath(uri);
        final HttpPut request = (HttpPut) setupRequest(path, HttpPut.METHOD_NAME, null);
        request.setEntity(contentType == null ? new FileEntity(sourceFile) : new FileEntity(sourceFile, ContentType.parse(contentType)));
        performRequest(request);
    }
1044940
function put($path, $body, $contentType = null)
	{
		return $this->_dispatchRequest(
			$this->_buildRequest('PUT', $path, $body, $contentType)
		);
	}
767841
public void setContentType(String contentType) throws InvalidArgumentException {
    if (Strings.isNullOrEmpty(contentType)) {
      throw new InvalidArgumentException("empty content type");
    }

    this.contentType = contentType;
  }
552450
public static Response post(URI uri)
        throws URISyntaxException, UnsupportedEncodingException, HttpException {
        return postParams(new HttpPost(uri), new ArrayList<NameValuePair>(), null, null);
    }
1140153
public void putIfMatch(URI uri, String eTag, String mimetype,
			String content, Header[] additionalRequestHeaders,
			Credentials credentials) {
		ra.getExecutorService().execute(
				new AsyncPutIfMatchStringContentHandler(ra, handle, uri, eTag,
						mimetype, content, additionalRequestHeaders,
						credentials));
	}
1186069
InputStream put(URI uri, String contentType) {
        HttpConnection connection = Http.PUT(uri, contentType);
        return executeToInputStream(connection);
    }