Examples of Post


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

    assertion(post, "POST /search HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Content-Length:21\r\n\r\nq=http4j&m=GET&m=POST");
  }

  @Test(dependsOnMethods = "toMessage")
  public void setHeader() throws URISyntaxException, IOException {
    Post post = new Post("http://www.google.com/?u=http4j&p=http4j");
    post.setHeader(Headers.ACCEPT_CHARSET, "ISO-8859-1");
    assertion(post, "POST / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:ISO-8859-1\r\nContent-Length:17\r\n\r\nu=http4j&p=http4j");
    post.setHeader(Headers.ACCEPT_CHARSET, "UTF-8");
    assertion(post, "POST / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:UTF-8\r\nContent-Length:17\r\n\r\nu=http4j&p=http4j");
  }
View Full Code Here

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

    assertion(post, "POST / HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Accept-Charset:UTF-8\r\nContent-Length:17\r\n\r\nu=http4j&p=http4j");
  }
 
  @Override
  protected Request createRequest(String url) throws MalformedURLException, URISyntaxException {
    return new Post(url);
  }
View Full Code Here

Examples of com.joedayz.corespringtest.domain.Post

   
    Comentario comentario = new Comentario();
    if(id != null){
     
      List<Comentario> comentarios = comentarioService.listarTodosLosComentariosPorPost(id);
      Post post = postService.obtenerPost(id);
      comentario.setIdPost(post.getId());
     
      model.addAttribute(COMENTARIOS, comentarios);
      model.addAttribute(POST, post);     
    }   
    return comentario;
View Full Code Here

Examples of com.l2jfrozen.gameserver.communitybbs.BB.Post

    _postByTopic = new FastMap<Topic, Post>();
  }

  public Post getGPosttByTopic(Topic t)
  {
    Post post = null;
    post = _postByTopic.get(t);

    if(post == null)
    {
      post = load(t);
View Full Code Here

Examples of com.ponxu.blog4j.model.Post

*
* @author xwz
*/
public class PageDetail extends BlogHandler {
  public void get(String url) {
    Post page = postService.getByUrl(url);
    if (page == null) {
      renderString("找不到页面!");
      return;
    }
   
View Full Code Here

Examples of com.rapleaf.jack.test_project.database_1.models.Post

        } else {
          stmt.setTimestamp(4, new Timestamp(updated_at));
        }
      }
    }, getInsertStatement(Arrays.<String>asList("title", "posted_at_millis", "user_id", "updated_at")));
    Post newInst = new Post(__id, title, posted_at_millis, user_id, updated_at, databases);
    newInst.setCreated(true);
    cachedById.put(__id, newInst);
    clearForeignKeyCache();
    return newInst;
  }
View Full Code Here

Examples of com.restfb.types.Post

public class PostWithTotalCountITCase extends RestFbIntegrationTestBase {

  @Test
  public void checkPostWithCommentsAndLikes() {
    DefaultFacebookClient client = new DefaultFacebookClient(getAccessToken(), Version.VERSION_2_1);
    Post gotPost =
        client.fetchObject("74133697733_10152424266332734", Post.class,
          Parameter.with("fields", "from,to,likes.summary(true),comments.summary(true)"));
    assertNotNull(gotPost);
    assertTrue(gotPost.getLikesCount() > 0);
    assertTrue(gotPost.getLikes().getCount() > 0);
    assertEquals(gotPost.getLikesCount(), gotPost.getLikes().getCount());
    assertTrue(gotPost.getComments().getTotalCount() > 0);
  }
View Full Code Here

Examples of com.saasovation.collaboration.domain.model.forum.Post

                    "authorId1",
                    "Post Test",
                    "Post test text...",
                    result);

        Post post =
                DomainRegistry
                    .postRepository()
                    .postOfId(
                            discussion.tenant(),
                            new PostId(postId));

        assertNotNull(discussionId);
        assertNotNull(post);
        assertEquals("authorId1", post.author().identity());
        assertEquals("Post Test", post.subject());
        assertEquals("Post test text...", post.bodyText());
    }
View Full Code Here

Examples of com.sandrini.sandelivery.model.Post

    return getSession().createQuery("from Post order by description")
        .list();
  }

  public void deletePost(Long postId) {
    Post post = getPost(postId);
    if (post != null) {
      getSession().delete(post);
    }
  }
View Full Code Here

Examples of com.steeplesoft.frenchpress.model.Post

        // Create Post
        Response response = target.request().accept(MediaType.APPLICATION_JSON).get();
        assertNotNull(response);
        assertNotNull(response.readEntity(String.class));
        Post post = new Post();
        post.setTitle("REST Test");
        post.setSlug("rest-test");

        response = target.request(MediaType.APPLICATION_JSON).post(Entity.entity(post, MediaType.APPLICATION_JSON));
        assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());

        Post newPost = response.readEntity(Post.class);
        assertNotNull(newPost);

        // Update Post
        newPost.setTitle("Updated");
        response = target.path("id").path(newPost.getId().toString()).request().put(Entity.entity(newPost, MediaType.APPLICATION_JSON));
        assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());

        // Delete Post
        response = target.path("id").path(newPost.getId().toString()).request().delete();
        assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus());
    }
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.