Examples of RequestBody


Examples of com.adaptrex.core.rest.RequestBody

      while ((line = br.readLine()) != null) {
        sb.append(line);
      }
      String post = sb.toString();
     
    return new RequestBody((Map<String,Object>) StringUtilities.fromJson(post, Map.class));
  }
View Full Code Here

Examples of com.github.restdriver.serverdriver.http.RequestBody

     * @param content Request body content as String.
     * @param contentType content-type eg text/plain.
     * @return The new request body instance.
     */
    public static RequestBody body(String content, String contentType) {
        return new RequestBody(content, contentType);
    }
View Full Code Here

Examples of com.google.greaze.definition.webservice.RequestBody

        WebServiceRequestInlined inlinedBody = convertToInlinedBody(request);
        requestBodyContents = bodyToJson(inlinedBody);
      } else {
        addRequestParams(conn, request.getHeaders());
        if (method != HttpMethod.GET && method != HttpMethod.DELETE) {
          RequestBody requestBody = request.getBody();
          requestBodyContents = bodyToJson(requestBody);
        }
      }
      requestBodyContents = stripEnclosingQuotes(requestBodyContents);
      if (GreazeStrings.isNotEmpty(requestBodyContents)) {
View Full Code Here

Examples of org.apache.ambari.server.api.services.RequestBody

  @Override
  public Set<RequestBody> parse(String body) throws BodyParseException {

    Set<RequestBody> requestBodySet = new HashSet<RequestBody>();
    RequestBody      rootBody       = new RequestBody();
    rootBody.setBody(body);

    if (body != null && body.length() != 0) {
      ObjectMapper mapper = new ObjectMapper();
      try {
        JsonNode root = mapper.readTree(ensureArrayFormat(body));

        Iterator<JsonNode> iterator = root.getElements();
        while (iterator.hasNext()) {
          JsonNode            node             = iterator.next();
          Map<String, Object> mapProperties    = new HashMap<String, Object>();
          Map<String, String> requestInfoProps = new HashMap<String, String>();
          NamedPropertySet    propertySet      = new NamedPropertySet("", mapProperties);

          processNode(node, "", propertySet, requestInfoProps);

          if (!requestInfoProps.isEmpty()) {
            // If this node has request info properties then add it as a
            // separate request body
            RequestBody requestBody = new RequestBody();
            requestBody.setBody(body);

            for (Map.Entry<String, String> entry : requestInfoProps.entrySet()) {
              String key   = entry.getKey();
              String value = entry.getValue();

              requestBody.addRequestInfoProperty(key, value);

              if (key.equals(QUERY_FIELD_NAME)) {
                requestBody.setQueryString(value);
              }
            }
            if (!propertySet.getProperties().isEmpty()) {
              requestBody.addPropertySet(propertySet);
            }
            requestBodySet.add(requestBody);
          } else {
            // If this node does not have request info properties then add it
            // as a new property set to the root request body
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        KdcRequest message = getKdcRequest( tgt, requestBody );

        handler.messageReceived( session, message );
    }
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        KdcRequest message = getKdcRequest( tgt, requestBody );

        handler.messageReceived( session, message );
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        // Get the session key from the service ticket.
        sessionKey = tgt.getEncTicketPart().getSessionKey();

        // Generate a new sequence number.
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        KdcRequest message = getKdcRequest( tgt, requestBody );

        handler.messageReceived( session, message );
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        try
        {
            getKdcRequest( tgt, requestBody, ChecksumType.DES_MAC_K );
        }
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.messages.value.RequestBody

        long currentTime = System.currentTimeMillis();

        KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY );
        modifier.setTill( requestedEndTime );

        RequestBody requestBody = modifier.getRequestBody();

        KdcRequest message = getKdcRequest( tgt, requestBody );

        handler.messageReceived( session, message );
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.