Package org.springframework.http

Examples of org.springframework.http.HttpHeaders


     * @throws ZencoderClientException
     */
    public void cancelJob(String id) throws ZencoderClientException {
        String url = api_url + "/jobs/" + id + "/resubmit.json";

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

        try {
            rt.exchange(
View Full Code Here


     * @throws ZencoderClientException
     */
    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(
View Full Code Here

        } catch (Exception e) {
            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 {
View Full Code Here

     * @throws ZencoderClientException
     */
    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 {
View Full Code Here

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

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

        try {
            rt.exchange(
View Full Code Here

     * @throws ZencoderClientException
     */
    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 {
View Full Code Here

     * @throws ZencoderClientException
     */
    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 {
View Full Code Here

     * @throws ZencoderClientException
     */
    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 {
View Full Code Here

         
          if (!(shpFile && shxFile && dbfFile)){
            logger.error("Not all necessary files are present.");
            throw new Exception("Not all necesary files are present.");
          }
          HttpHeaders headers = new HttpHeaders();
          headers.setContentType(MediaType.MULTIPART_FORM_DATA);
          //headers.setContentType(MediaType.parseMediaType("multipart/form-data;charset=utf-8"));
         
         
          List<Charset> charSets = new ArrayList<Charset>();
          charSets.add(Charset.forName("UTF-8"));
          headers.setAcceptCharset(charSets);
          HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<MultiValueMap<String, Object>>(map, headers);

          /*try {
            while(true){
              Thread.sleep(500);
View Full Code Here

  @RequestMapping(method = RequestMethod.POST, consumes = {"application/json"})
  @ResponseStatus(HttpStatus.CREATED)
  public HttpEntity<?> create(@RequestBody Book book, @Value("#{request.requestURL}") StringBuffer parentUri) {
    book = this.bookRepository.save(book);
    HttpHeaders headers = new HttpHeaders();
    headers.setLocation(childLocation(parentUri, book.getId()));
    return new HttpEntity<Object>(headers);
  }
View Full Code Here

TOP

Related Classes of org.springframework.http.HttpHeaders

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.