Proba naprawienia

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2021-01-09 14:00:29 +01:00
parent 11d21be627
commit 2320d66a35
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -43,7 +43,7 @@ public class UsosApiService {
/**
* /services/users/user
*
*
* @param usosId user id in usos
* @return UserApiResponse modle contatining desired values
*/
@ -52,14 +52,16 @@ public class UsosApiService {
try {
final OAuth10aService service = new ServiceBuilder(apikey).apiSecret(apisecret)
.build(UsosOauth1Service.instance());
final OAuthRequest request = new OAuthRequest(Verb.GET, apiUrl + "/services/users/user?user_id=" + usosId);
service.signRequest(new OAuth1AccessToken("", ""), request);
System.out.println("PRZED TRY");
try (Response response = service.execute(request)) {
System.out.println("TRY");
final String json = response.getBody();
if (json != null){
System.out.println(json == null);
System.out.println(json == "null");
if (json != "null" && json != null){
System.out.println(json);
System.out.println("Przed Object");
final ObjectMapper mapper = new ObjectMapper();