コード例 #1
0
ファイル: RequestEditView.java プロジェクト: GHubgenius/Vega
  public void setRequest(IRequestLogRecord record) throws URISyntaxException {
    if (record != null) {
      requestBuilder.setFromRequest(record);
    } else {
      requestBuilder.clear();
    }

    if (requestBuilderPartCurr != null) {
      requestBuilderPartCurr.refresh();
    }
  }
コード例 #2
0
ファイル: RequestEditView.java プロジェクト: GHubgenius/Vega
  public void sendRequest() {
    if (requestBuilderPartCurr != null) {
      try {
        requestBuilderPartCurr.processContents();
      } catch (Exception e) {
        displayExceptionError(e);
        return;
      }
    }

    HttpUriRequest uriRequest;
    try {
      uriRequest = requestBuilder.buildRequest();
    } catch (Exception e) {
      displayExceptionError(e);
      return;
    }

    BasicHttpContext ctx = new BasicHttpContext();
    IHttpResponse response;
    try {
      response = requestEngine.sendRequest(uriRequest, ctx);
      responseViewer.displayHttpResponse(response.getRawResponse());
    } catch (Exception e) {
      displayExceptionError(e);
      return;
    }
    if (contentAnalyzer != null) {
      contentAnalyzer.processResponse(response);
    }

    if (requestBuilderPartCurr != null) {
      requestBuilderPartCurr.refresh();
    }
  }