Examples of Get


Examples of com.adito.vfs.webdav.methods.GET

     *
     */
    public void initialiseProcessor() {
        this.methods = new HashMap();
        this.methods.put("DELETE", new DELETE());
        this.methods.put("GET", new GET());
        this.methods.put("HEAD", new HEAD());
        this.methods.put("MKCOL", new MKCOL());
        this.methods.put("MOVE", new MOVE());
        this.methods.put("OPTIONS", new OPTIONS());
        this.methods.put("PROPFIND", new PROPFIND());
View Full Code Here

Examples of com.alibaba.otter.canal.protocol.CanalPacket.Get

                                                                      unsub.toString()).getMessage(), ctx.getChannel(),
                                         null);
                    }
                    break;
                case GET:
                    Get get = CanalPacket.Get.parseFrom(packet.getBody());
                    if (StringUtils.isNotEmpty(get.getDestination()) && StringUtils.isNotEmpty(get.getClientId())) {
                        clientIdentity = new ClientIdentity(get.getDestination(), Short.valueOf(get.getClientId()));
                        MDC.put("destination", clientIdentity.getDestination());
                        Message message = embededServer.getWithoutAck(clientIdentity, get.getFetchSize());

                        Packet.Builder packetBuilder = CanalPacket.Packet.newBuilder();
                        packetBuilder.setType(PacketType.MESSAGES);

                        Messages.Builder messageBuilder = CanalPacket.Messages.newBuilder();
                        messageBuilder.setBatchId(message.getId());
                        if (message.getId() != -1 && !CollectionUtils.isEmpty(message.getEntries())) {
                            for (Entry entry : message.getEntries()) {
                                messageBuilder.addMessages(entry.toByteString());
                            }
                        }
                        packetBuilder.setBody(messageBuilder.build().toByteString());
                        NettyUtils.write(ctx.getChannel(), packetBuilder.build().toByteArray(), null);// 输出数据
                    } else {
                        NettyUtils.error(
                                         401,
                                         MessageFormatter.format("destination or clientId is null", get.toString()).getMessage(),
                                         ctx.getChannel(), null);
                    }
                    break;
                case CLIENTACK:
                    ClientAck ack = CanalPacket.ClientAck.parseFrom(packet.getBody());
View Full Code Here

Examples of com.google.api.services.bigquery.Bigquery.Jobs.Get

    if (projectResponse.getTotalItems() == 0) {
      return null;
    }

    Projects project = projectResponse.getProjects().get(0);
    Get jobsRequest = bigquery.jobs().get(project.getId(), jobId);
    Job j = jobsRequest.execute();
    return j;
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Get

    client = new BasicClient();
  }
 
  @Test
  public void submit() throws IOException, InterruptedException, URISyntaxException {
    Response response = client.submit(new Get("http://code.google.com/p/http4j/"));
    checkResponse(response);
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Get

    executor = new BasicRequestExecutor(manager, cookieCache, parser);
  }
 
  @Test
  public void execute() throws URISyntaxException, InterruptedException, IOException {
    Request request = new Get("http://www.baidu.com/");
    Response response = executor.execute(request);
    Assert.assertNotNull(response);
    checkStatus(response);
    checkHeaders(response);
    checkCharsetAndEntity(response);
View Full Code Here

Examples of com.google.code.http4j.impl.Get

*/
public final class GetTestCase extends RequestTestCase {
 
  @Test(expectedExceptions = MalformedURLException.class)
  public void construct_cause_MalformedURLException() throws MalformedURLException, URISyntaxException {
    new Get("code.google.com/p/http4j");
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Get

    assertion("http://127.0.0.1:8080/index.xhtml;jsessionid=ABCDE?user=colin","GET /index.xhtml;jsessionid=ABCDE?user=colin HTTP/1.1\r\nHost:127.0.0.1:8080\r\n" + getDefaultHeaderString() + "\r\n");
  }

  @Test(dependsOnMethods = "toMessage")
  public void addParameter_string_strings() throws URISyntaxException, IOException {
    Get get = new Get("http://www.google.com/search");
    get.addParameter("q", "http4j");
    assertion(get, "GET /search?q=http4j HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "\r\n");
    get.addParameter("m", "GET", "POST");
    assertion(get, "GET /search?q=http4j&m=GET&m=POST HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "\r\n");
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Get

    assertion(get, "GET /search?q=http4j&m=GET&m=POST HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "\r\n");
  }
 
  @Test(dependsOnMethods = "toMessage")
  public void setHeader() throws URISyntaxException, IOException {
    Get get = new Get("http://www.google.com");
    get.setHeader(Headers.ACCEPT_CHARSET, "ISO-8859-1");
    assertion(get, "GET / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:ISO-8859-1\r\n\r\n");
    get.setHeader(Headers.ACCEPT_CHARSET, "UTF-8");
    assertion(get, "GET / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:UTF-8\r\n\r\n");
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Get

    assertion(get, "GET / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:UTF-8\r\n\r\n");
  }
 
  @Override
  protected Request createRequest(String url) throws MalformedURLException, URISyntaxException {
    return new Get(url);
  }
View Full Code Here

Examples of com.taobao.tdhs.client.request.Get

    private final String[] fields = {"id", "name", "level"};

    @Test
    public void testTenThousand() throws TDHSException {
        TableInfo tableInfo = new TableInfo(db, table, null, fields);
        Get get = new Get(tableInfo, new String[][]{{"-1"}},
                TDHSCommon.FindFlag.TDHS_GE, 0, 10000);
        TDHSResponse r = client.count(get);
        Assert.assertEquals(TDHSResponseEnum.ClientStatus.OK, r.getStatus());
        Assert.assertEquals(1, r.getFieldData().size());
        Assert.assertEquals("10000", r.getFieldData().get(0).get(0));
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.