POST to the given URI the passed {@link JsonPayload}.
501836
public Observable<HttpClientResponse<ByteBuf>>
  postSmile(String uriStr, JsonPayload payload) {
    byte[] entity = toByteArray(SMILE_FACTORY, payload);
    URI uri = URI.create(uriStr);
    return rxHttp.post(uri, SMILE_CONTENT_TYPE, entity);
  }
674342
def post(method, hmc, uri, uri_parms, body, logon_required,
             wait_for_completion):
        """"""
        assert wait_for_completion is True  # async not supported yet
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.update(body)
1361326
public static String post(String url, Map<String, String> customHeaders, Map<String, String> params) throws IOException, HTTPException {
        LOGGER.log(Level.INFO, "Sending POST request to the url {0}", url);

        HttpPost httpPost = new HttpPost(url);

        populateHeaders(httpPost, customHeaders);

        if (params != null && params.size() > 0) {
            List<NameValuePair> nameValuePairs = new ArrayList<>();
            for (Map.Entry<String, String> param : params.entrySet()) {
                nameValuePairs.add(new BasicNameValuePair(param.getKey(), param.getValue()));
            }
            httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        }

        HttpClient httpClient = HttpClientBuilder.create().build();

        HttpResponse httpResponse = httpClient.execute(httpPost);

        int statusCode = httpResponse.getStatusLine().getStatusCode();
        if (isErrorStatus(statusCode)) {
            String jsonErrorResponse = EntityUtils.toString(httpResponse.getEntity(), StandardCharsets.UTF_8);
            throw new HTTPException(statusCode, httpResponse.getStatusLine().getReasonPhrase(), jsonErrorResponse);
        }

        return EntityUtils.toString(httpResponse.getEntity(), StandardCharsets.UTF_8);
    }
767119
def _post(self, url, data=None, json=None, params=None, headers=None):
        """"""
        url = self.clean_url(url)
        response = requests.post(url, data=data, json=json, params=params,
                                 headers=headers, timeout=self.timeout,
                                 verify=self.verify)
        return response
1141489
public void post(String jsonBody, Integer expectedResponseCode) throws IOException {
    HttpURLConnection conn = getUrlConnection();

    try {
      // send post request with json body for the topology
      if (!NetworkUtils.sendHttpPostRequest(conn, NetworkUtils.JSON_TYPE, jsonBody.getBytes())) {
        throw new IOException("Failed to send POST to " + endpointURI);
      }

      // check the response
      if (!NetworkUtils.checkHttpResponseCode(conn, expectedResponseCode)) {
        byte[] bytes = NetworkUtils.readHttpResponse(conn);
        LOG.log(Level.SEVERE, "Failed to send POST request to endpoint");
        LOG.log(Level.SEVERE, new String(bytes));
        throw new IOException("Unexpected response from connection. Expected "
            + expectedResponseCode + " but received " + conn.getResponseCode());
      }
    } finally {
      conn.disconnect();
    }
  }
59934
def _post_json(self, url, data, **kw):
        '''
        
        '''
        data = json.dumps(data)
        headers = kw.pop('headers', {})
        headers.setdefault('Content-Type', 'application/json')
        headers.setdefault('Accept', 'application/json')

        kw['headers'] = headers
        kw['data'] = data
        return self._post(url, **kw)
730681
private <T> PubsubFuture<T> post(final String operation, final String path, final Object payload,
                                   final ResponseReader<T> responseReader) {
    return request(operation, HttpMethod.POST, path, payload, responseReader);
  }
1008606
public void sendJsonPayload(String json) {
    try {
      this.configReadLock.lock();
      Config config = this.config;
      this.configReadLock.unlock();

      sendPayload(config, new Payload(json));
    } catch (Exception e) {
      LOGGER.error("Error while sending payload to Rollbar: {}", e);
    }
  }
1077007
private <T> HttpUriRequest prepareRequest(URI uri, Map<String, String> headers, String jsonData) {
        HttpUriRequest httpRequest;
        if (jsonData != null) {
            // POST data
            HttpPost httpPost = new HttpPost(uri);
            httpPost.setEntity(new StringEntity(jsonData, ContentType.APPLICATION_JSON));
            httpRequest = httpPost;
        } else {
            // GET request
            httpRequest = new HttpGet(uri);
        }
        httpRequest.addHeader(HttpHeaders.ACCEPT, "application/json");
        headers.forEach(httpRequest::addHeader);

        return httpRequest;
    }
1021628
private Object postRequest(HttpMethod httpMethod, String restUrl, Map<String, String> params) throws IOException, WebServiceException {
		HttpURLConnection conn = null;
		BufferedWriter wr = null;
		try {
			// Make the URL
			urlString = new StringBuilder(this.host).append(restUrl);
            LOGGER.debug("Doing HTTP request: POST [{}]", urlString.toString());
			// Connection configuration
//            Proxy proxy = DEBUG_HTTP ? new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8008)) : Proxy.NO_PROXY;			
            URL url = new URL(urlString.toString());
			conn = (HttpURLConnection) url.openConnection();
			conn.setDoInput(true);
			conn.setDoOutput(true);
			conn.setUseCaches(false);
			conn.setRequestMethod(HttpMethod.POST.name());
			conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
			conn.setRequestProperty("Connection", "Keep-Alive");

			wr = new BufferedWriter(new OutputStreamWriter(conn.getOutputStream()));
			// Writes into the alive connection
			if (httpMethod != HttpMethod.POST) {
				params.put("http_method", httpMethod.name());
			}
			wr.write(this.makeParamsString(params, false));
			wr.flush();
			// Gets the response
			return this.readResponse(restUrl, conn);
        } catch (WebServiceException e) {
            LOGGER.debug("WebServiceException catched. Request error", e);
            throw e;
		} catch (IOException e) {
            LOGGER.debug("IOException catched. Request error", e);
			throw e;
		} catch (Exception e) {
            LOGGER.debug("Exception catched, throwing a new IOException. Request error", e);
            throw new IOException(e.getLocalizedMessage());
        } finally {
			if (wr != null) {
				wr.close();
			}
			if (conn != null) {
				conn.disconnect();
			}
		}
	}
631508
public static Route POST(String uriPattern, RouteHandler routeHandler) {
        return new Route(HttpConstants.Method.POST, uriPattern, routeHandler);
    }
835181
def _post(self, uri, data, headers=None):
        
        if not headers:
            headers = self._get_headers()

        logging.debug("URI=" + str(uri))
        logging.debug("HEADERS=" + str(headers))
        logging.debug("BODY=" + str(data))

        response = self.session.post(uri, headers=headers,
                data=json.dumps(data))

        logging.debug("STATUS=" + str(response.status_code))
        if response.status_code in [200, 201]:
            return response.json()
        else:
            logging.error(b"ERROR=" + response.content)
            response.raise_for_status()
824771
public String post(final String path, final byte[] jsonBytes) throws IOException, HttpException {
		return post(path, jsonBytes, false);
	}
879697
public void doPost(HttpServletRequest sreq, HttpServletResponse sres) 
        throws ServletException, IOException
    {
        doGet(sreq,sres);
    }
240851
def post(self, request, uri):
        
        uri = self.decode_uri(uri)
        data, meta = self.get_post_data(request)
        meta['author'] = auth.get_username(request)
        node = cio.set(uri, data, publish=False, **meta)
        return self.render_to_json(node)
2099
@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        preProcessRequest(request);

        DefaultServerDolphin serverDolphin = resolveServerDolphin(request);

        String input = readInput(request);
        if (LOG.isLoggable(Level.FINEST)) {
            LOG.finest("received json: " + input);
        }

        List<Command> commands = decodeInput(serverDolphin.getServerConnector().getCodec(), input);

        List<Command> results = handleCommands(serverDolphin.getServerConnector(), commands);

        String output = encodeOutput(serverDolphin.getServerConnector().getCodec(), results);

        writeHeaders(request, response, results);

        if (LOG.isLoggable(Level.FINEST)) {
            LOG.finest("sending json response: " + output);
        }
        writeOutput(response, output);

        postProcessResponse(response);
    }
340492
public RestResponse put(final String uri, final Map<String, Object> params) throws IOException,
            AppPlatformException {
        return request(getPath(uri), HttpPut.METHOD_NAME, params);
    }