Examples of addHeader()


Examples of api.http.HttpRequest.addHeader()

    this.googleapi = googleapi;
    URL url = new URL("https://picasaweb.google.com/data/feed/api/user/" + user);
    HttpRequest httpRequest = new HttpRequest(url);
    if (googleapi != null){
      KeyValuePair pair = googleapi.toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    this.initial(document.getDocumentElement());
  }
View Full Code Here

Examples of ascii.Table.addHeader()

    int col1Width = (int) Math.log10(files.length) + 1;
    int col2Width = 40 - col1Width;

    Table table = new Table(col1Width, col2Width);

    table.addHeader("#", "Command");

    for (int i = 0; i < files.length; i++)
      table.addRow(String.valueOf(i), files[i].getName());

    do {
View Full Code Here

Examples of bg.smoc.model.web.ResultsTable.addHeader()

    private ResultsTable loadTable(Vector<Contest> selectedContests,
            Hashtable<String, Hashtable<String, UserContestData>> reportData, Vector<Person> persons)
            throws RemoteException {
        ResultsTable resultsTable = new ResultsTable();
        loadHeaderList(resultsTable.addHeader(), selectedContests);
        loadTableData(resultsTable, selectedContests, reportData, persons);
        return resultsTable;
    }

    private void loadTableData(ResultsTable table, Vector<Contest> selectedContests,
View Full Code Here

Examples of ca.uhn.fhir.rest.client.BaseClientInvocation.addHeader()

   
    TagList list = (TagList) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.TAG_LIST);
    if (list != null) {
      for (Tag tag : list) {
        if (StringUtils.isNotBlank(tag.getTerm())) {
          retVal.addHeader(Constants.HEADER_CATEGORY, tag.toHeaderValue());
        }
      }
    }

    return retVal;
View Full Code Here

Examples of ca.uhn.fhir.rest.client.PutClientInvocation.addHeader()

          StringBuilder b = new StringBuilder();
          b.append('/');
          b.append(urlExtension);
          b.append("/_history/");
          b.append(versionId);
          retVal.addHeader(Constants.HEADER_CONTENT_LOCATION, b.toString());
        }
      }
    }

    return retVal;
View Full Code Here

Examples of ch.mimo.netty.handler.codec.icap.DefaultIcapRequest.addHeader()

        }

        // Prepare the ICAP request.
        IcapRequest request = new DefaultIcapRequest(IcapVersion.ICAP_1_0,IcapMethod.REQMOD,"/simple","localhost");
        request.setBody(IcapMessageElementEnum.REQBODY);
        request.addHeader(IcapHeaders.Names.PREVIEW,"50");
        HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST,"/some/servers/uri");
        httpRequest.setHeader(HttpHeaders.Names.HOST,host);
        httpRequest.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
        httpRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
        request.setHttpRequest(httpRequest);
View Full Code Here

Examples of ch.mimo.netty.handler.codec.icap.DefaultIcapResponse.addHeader()

    }
    if(request.getHttpResponse() != null) {
      request.getHttpResponse().addHeader(HttpHeaders.Names.VIA,"icap://my.icap.server");
      response.setHttpResponse(request.getHttpResponse());
    }
    response.addHeader(IcapHeaders.Names.ISTAG,"SimpleServer-version-1.0");
   
    ChannelBuffer buffer = null;
    switch (bodyType) {
    case NULLBODY:
      // No body in request
View Full Code Here

Examples of ch.mimo.netty.handler.codec.icap.IcapRequest.addHeader()

        }

        // Prepare the ICAP request.
        IcapRequest request = new DefaultIcapRequest(IcapVersion.ICAP_1_0,IcapMethod.REQMOD,"/simple","localhost");
        request.setBody(IcapMessageElementEnum.REQBODY);
        request.addHeader(IcapHeaders.Names.PREVIEW,"50");
        HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST,"/some/servers/uri");
        httpRequest.setHeader(HttpHeaders.Names.HOST,host);
        httpRequest.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
        httpRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
        request.setHttpRequest(httpRequest);
View Full Code Here

Examples of ch.mimo.netty.handler.codec.icap.IcapResponse.addHeader()

      System.out.println("");
      System.out.println("---------------------------- receiving " + request.getMethod() + " ----------------------------");
      System.out.print(message.toString());
      if(request.getMethod().equals(IcapMethod.OPTIONS)) {
        response = new DefaultIcapResponse(IcapVersion.ICAP_1_0,IcapResponseStatus.OK);
        response.addHeader("Options-TTL","3600");
        response.addHeader("Service-ID","Test Icap Server");
        response.addHeader("Allow","204");
        response.addHeader("Preview","1024");
        response.addHeader("Methods","REQMOD, RESPMOD");
       
View Full Code Here

Examples of ch.rasc.wampspring.message.UnsubscribeMessage.addHeader()

    // listed topicURI, send them to the AnnotationMethodHandler so he can
    // call any available method that is annotated with
    // @WampUnsubscribeListener
    for (String topicURI : topicURIs) {
      UnsubscribeMessage unsubscribeMessage = new UnsubscribeMessage(topicURI);
      unsubscribeMessage.addHeader(WampMessageHeader.WEBSOCKET_SESSION_ID, sessionId);
      annotationMethodHandler.handleMessage(unsubscribeMessage);
    }
    annotationMethodHandler.unregisterSessionFromAllPrefixCurie(sessionId);
  }
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.