Examples of JsonHttpEntity


Examples of com.uip.tatar.network.JsonHttpEntity

            .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
            .setDateFormat("yyyy-MM-dd")
            .create()
            .toJson(user);

        client.put(new APITatarAuthRequest(USERS_SECTION + "/" + user.getId(), new JsonHttpEntity(json)), null);

        user.clearUnsetData();

        return user;
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

     * @return
     * @throws APITatarException
     */
    @Override
    public User createUser(String phoneNumber, String password) throws APITatarException {
        JsonHttpEntity entity = new JsonHttpEntity();
        entity.put("username", phoneNumber);
        entity.put("password", password);

        return client.post(
                new APITatarRequest(USERS_SECTION, entity),
                new UserModelFactory(false)
        );
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

     * @param message
     * @throws APITatarException
     */
    @Override
    public void sendSMS(String userId, String message) throws APITatarException {
        JsonHttpEntity entity = new JsonHttpEntity();
        entity.put("type", "gosuslugi");
        entity.put("region_number", "16");
        entity.put("message", message);

        client.post(new APITatarRequest(USERS_SECTION + "/" + userId + "/sms", entity), null);
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

    public APITatarRequest(String resource) {
        setResource(resource);
        this.headers    = new HashMap<String, String>();
        this.query      = new HttpQueryParams();
        this.content    = new JsonHttpEntity();
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

    public APITatarRequest(String resource, HttpQueryParams query) {
        setResource(resource);
        this.query      = query;
        this.headers    = new HashMap<String, String>();
        this.content    = new JsonHttpEntity();
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

    public APITatarRequest(String resource, HashMap<String, String> headers) {
        setResource(resource);
        this.headers    = headers;
        this.query      = new HttpQueryParams();
        this.content    = new JsonHttpEntity();
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

    public APITatarRequest(String resource, HttpQueryParams query, HashMap<String, String> headers) {
        setResource(resource);
        this.query      = query;
        this.headers    = headers;
        this.content    = new JsonHttpEntity();
    }
View Full Code Here

Examples of com.uip.tatar.network.JsonHttpEntity

    public void setSession(Session session) {
        this.session = session;
    }

    private APITatarRequest createAuthRequest(String username, String password) {
        JsonHttpEntity userAuthParams = new JsonHttpEntity();
        userAuthParams.put("username", username);
        userAuthParams.put("password", password);

        return new APITatarRequest("sessions", userAuthParams);
    }
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.