added post api on java server