Examples of HTTPException


Examples of cn.aprilsoft.TinyAppServer.exception.HttpException

        } catch (ClientAbortException e) {
            log.info("Client abort connection.");
        } catch (SocketException e) {
            log.info("Client abort connection.");
        } catch (IOException e) {
            throw new HttpException(e);
        }
    }
View Full Code Here

Examples of com.dbxml.labrador.http.HTTPException

                  response.setHeader(HTTP.HEADER_CACHE_CONTROL, HTTP.VALUE_CACHE);
                  response.setHeader(HTTP.HEADER_LAST_MODIFIED, lastModified);

                  String since = request.getHeader(HTTP.HEADER_IF_MODIFIED_SINCE);
                  if ( since != null && since.length() > 0 && since.equals(lastModified) )
                     throw new HTTPException(HTTP.CODE_NOT_MODIFIED, HTTP.STATUS_NOT_MODIFIED);
               }
            }
         }

         if ( type == Container.TYPE_DOCUMENT ) {
View Full Code Here

Examples of com.dg.libs.rest.exceptions.HttpException

        throw new RuntimeException(
            "RequestMethod not supported, Only POST and PUT can contain body");
      }
    } catch (UnsupportedEncodingException e) {
      ALog.w(TAG, "", e);
      throw new HttpException(e);
    } catch (IOException e) {
      ALog.w(TAG, "", e);
      throw new HttpException(e);
    }
  }
View Full Code Here

Examples of com.elibom.jogger.http.HttpException

    try {
      response.getWriter().print(html);
      this.written = true;
      return this;
    } catch (IOException e) {
      throw new HttpException(e);
    }
  }
View Full Code Here

Examples of com.github.mrcritical.ironcache.model.HTTPException

  @Override
  public boolean handleResponse(final HttpRequest request, final HttpResponse response, final boolean supportsRetry)
      throws IOException {
    log.trace("HTTP request {} resulted in {} with response {} and headers {}", request.getUrl().toString(),
        response.getStatusCode(), response.getStatusMessage(), response.getHeaders().toString());
    throw new HTTPException(response.getStatusCode(), response.getStatusMessage());
  }
View Full Code Here

Examples of com.google.api.explorer.client.base.http.HttpException

  void handleResponse(DynamicJso response) {
    try {
      callback.onSuccess(ApiResponse.fromData(response));
    } catch (JavaScriptException e) {
      callback.onFailure(new HttpException("Unknown error"));
    }
  }
View Full Code Here

Examples of com.maxmind.geoip2.exception.HttpException

        GenericUrl uri = this.createUri(path, ipAddress);
        HttpResponse response = this.getResponse(uri);
        Long content_length = response.getHeaders().getContentLength();

        if (content_length == null || content_length.intValue() <= 0) {
            throw new HttpException("Received a 200 response for " + uri
                    + " but there was no message body.", 200, uri.toURL());
        }

        String body = WebServiceClient.getSuccessBody(response, uri);
View Full Code Here

Examples of com.meterware.httpunit.HttpException

        req = new GetMethodWebRequest(CONTEXT_URL + "/services/testHttpMethodRestrict");
        try {
            response = client.getResponse(req);
            fail("Expect the exception here");
        } catch (Exception ex) {
            HttpException httpException = (HttpException)ex;
            assertEquals("Get a wrong response code", 405, httpException.getResponseCode());
        }
    }
View Full Code Here

Examples of com.nabalive.framework.web.exception.HttpException

                            Query<User> query = userDAO.createQuery().filter("_id", user.getId());
                            user.setPassword(password);
                            userDAO.update(query, userDAO.createUpdateOperations().set("password", user.getPassword()).unset("resetId"));
                            response.writeJSON("ok");
                        }
                        throw new HttpException(HttpResponseStatus.INTERNAL_SERVER_ERROR, "bab reset ID");
                    }
                })
                .get(new Route("/user/reset/mail") {
                    @Override
                    public void handle(Request request, Response response, Map<String, String> map) throws Exception {
View Full Code Here

Examples of com.ramforth.webserver.exceptions.HttpException

            IHttpResponse httpResponse = createHttpResponseFromHttpRequest(httpRequest);
            httpResponse.setOutputStream(os);

            return new HttpContext(httpRequest, httpResponse);
        }
        catch (Exception ex) {            throw new HttpException(HttpStatusCode.STATUS_400_BAD_REQUEST, "Your HTTP client's request ended unexpectedly.");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.