package com.orhanobut.waspsample;

import com.orhanobut.wasp.CallBack;
import com.orhanobut.wasp.http.Auth;
import com.orhanobut.wasp.http.Body;
import com.orhanobut.wasp.http.BodyMap;
import com.orhanobut.wasp.http.DELETE;
import com.orhanobut.wasp.http.EndPoint;
import com.orhanobut.wasp.http.GET;
import com.orhanobut.wasp.http.Header;
import com.orhanobut.wasp.http.Headers;
import com.orhanobut.wasp.http.Mock;
import com.orhanobut.wasp.http.POST;
import com.orhanobut.wasp.http.PUT;

import java.util.List;
import java.util.Map;

/**
 * @author Orhan Obut
 */
public interface MyService {

    @Auth
    @GET("/ip")
    void fetchIps(
            CallBack<List<Ip>> callBack
    );

    @EndPoint("http://demo4699913.mockable.io")
    @Headers({
            "StaticHeaderKey1: StaticHeaderValue1",
            "StaticHeaderKey2: StaticHeaderValue2"
    })
    @GET("/test")
    void fetchIp(
            @Header("ParamHeaderKey") String paramHeader,
            @Body Ip ip,
            CallBack<Ip> callBack
    );

    @POST("/post")
    void postFoo(
            @Body Ip ip,
            CallBack<Ip> callBack
    );

    @Mock(statusCode = 300)
    @PUT("/put")
    void putFoo(
            @Body Ip ip,
            CallBack<Ip> callBack
    );

    @EndPoint("http://api.github.com")
    @DELETE("/delete")
    void deleteFoo(
            CallBack<Ip> callBack
    );

    //  @RetryPolicy(timeout = 1)
    @PUT("/put")
    void putFooMap(
            @BodyMap Map bodyMap,
            CallBack<Ip> callBack
    );

}

@@ -337,48 +337,8 @@
 er;%0A
-import com.orhanobut.wasp.http.Headers;%0A
 impo
@@ -647,181 +647,8 @@
 );%0A%0A
-    @EndPoint(%22http://demo4699913.mockable.io%22)%0A    @Headers(%7B%0A            %22StaticHeaderKey1: StaticHeaderValue1%22,%0A            %22StaticHeaderKey2: StaticHeaderValue2%22%0A    %7D)%0A
     
@@ -658,12 +658,10 @@
 T(%22/
-test
+ip
 %22)%0A 

Make service as it was at the beginning