Package org.springframework.http

Examples of org.springframework.http.HttpEntity


     */
    public void finishLiveJob(String id) throws ZencoderClientException {
        String url = api_url + "/jobs/" + id + "/finish";

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        try {
            rt.exchange(
                    url,
View Full Code Here


            throw new ZencoderClientException(
                    "Unable to serialize ZencoderAccount as JSON", e);
        }

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>(body, headers);

        ResponseEntity<String> response = null;
        try {
            response = rt.exchange(
View Full Code Here

     */
    public ZencoderAccountDetails getAccountDetails() throws ZencoderClientException {
        String url = api_url + "/account";

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        ResponseEntity<String> response = null;
        try {
            response = rt.exchange(
View Full Code Here

        } else {
            url = api_url + "/account/live";
        }

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        try {
            rt.exchange(
                    url,
View Full Code Here

     */
    public ZencoderVodUsage getUsageForVod(Date from, Date to, String grouping) throws ZencoderClientException {
        String url = api_url + "/reports/vod" + createUsageQueryArgString(from, to, grouping);

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        ResponseEntity<String> response = null;
        try {
            response = rt.exchange(
View Full Code Here

     */
    public ZencoderLiveUsage getUsageForLive(Date from, Date to, String grouping) throws ZencoderClientException {
        String url = api_url + "/reports/live" + createUsageQueryArgString(from, to, grouping);

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        ResponseEntity<String> response = null;
        try {
            response = rt.exchange(
View Full Code Here

     */
    public ZencoderAllUsage getUsageForVodAndLive(Date from, Date to, String grouping) throws ZencoderClientException {
        String url = api_url + "/reports/all" + createUsageQueryArgString(from, to, grouping);

        HttpHeaders headers = getHeaders();
        @SuppressWarnings("rawtypes")
        HttpEntity entity = new HttpEntity<String>("", headers);

        ResponseEntity<String> response = null;
        try {
            response = rt.exchange(
View Full Code Here

      super(responseType);
      if (requestBody instanceof HttpEntity) {
        this.requestEntity = (HttpEntity) requestBody;
      }
      else if (requestBody != null) {
        this.requestEntity = new HttpEntity(requestBody);
      }
      else {
        this.requestEntity = HttpEntity.EMPTY;
      }
    }
View Full Code Here

  private void writeParts(OutputStream os, MultiValueMap<String, Object> parts, byte[] boundary) throws IOException {
    for (Map.Entry<String, List<Object>> entry : parts.entrySet()) {
      String name = entry.getKey();
      for (Object part : entry.getValue()) {
        writeBoundary(boundary, os);
        HttpEntity entity = getEntity(part);
        writePart(name, entity, os);
        writeNewLine(os);
      }
    }
  }
View Full Code Here

  private HttpEntity getEntity(Object part) {
    if (part instanceof HttpEntity) {
      return (HttpEntity) part;
    }
    else {
      return new HttpEntity(part);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.http.HttpEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.