retrofit.http.EncodedPath Java Examples

The following examples show how to use retrofit.http.EncodedPath. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PatrulatrulAPI.java    From patrol-android with GNU General Public License v3.0 6 votes vote down vote up
@Multipart
@Headers({"Content-Type: multipart/form-data",
        "Accept: application/json",
        "Accept-Encoding: gzip, deflate"})
@POST("/api/{userID}/violation/create")
VideoAnswer uploadImage(@Part("photo") TypedFile photo,
                        @EncodedPath("userID") String userID,
                        @Part("latitude") double latitude,
                        @Part("longitude") double longitude);
 
Example #2
Source File: MockDataWebService.java    From divide with Apache License 2.0 4 votes vote down vote up
@Override
public Response get(@Header("Authorization") String authToken, @EncodedPath("objectType") String objectType, @Body Collection<String> keys) {
    verifyAuthToken(authToken);
    try {
        Collection<TransientObject> got = dao.get(objectType, keys.toArray(new String[keys.size()]));
        return new GsonResponse("",200,"",null, got).build();
    } catch (DAO.DAOException e) {
        return new GsonResponse("",e.getStatusCode(),e.getMessage(), null, null).build();
    }
}
 
Example #3
Source File: MockDataWebService.java    From divide with Apache License 2.0 4 votes vote down vote up
@Override
public Observable<Integer> count(@Header("Authorization") String authToken, @EncodedPath("objectType") String objectType) {
    verifyAuthToken(authToken);
    return Observable.from(dao.count(objectType));
}
 
Example #4
Source File: TapchatAPI.java    From tapchat-android with Apache License 2.0 votes vote down vote up
@GET("/{path}") @Streaming Response oobInclude(@EncodedPath("path") String path);