Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. public interface Wypok {
  2.     @FormUrlEncoded
  3.     @Headers("apisign: xxxxxxxxxxxxxxxxxxxx")
  4.     @POST("/user/login/appkey,yyyyyyyyyyyyyyyy")
  5.     Call<ResponseBody> listRepos(@Field("accountkey") String accountkey, @Field("login") String login);
  6. }
  7.  
  8. public class Demo {
  9.     public static void main(String[] args) throws IOException {
  10.         Retrofit retrofit = new Retrofit.Builder()
  11.                 .addConverterFactory(JacksonConverterFactory.create())
  12.                 .baseUrl("http://a.wykop.pl")
  13.                 .build();
  14.  
  15.         Wypok wypok = retrofit.create(Wypok.class);
  16.         System.out.println(wypok.listRepos("zzzzzzzzzzzzzz", "Roballo").execute().body().string());
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement