I am trying to Authenticate in discogs: https://www.discogs.com/developers/#page:authentication,header:authentication-oauth-flow on the Point 2: SEND A GET REQUEST TO THE DISCOGS REQUEST TOKEN URL, I get this: on the POINT 3: REDIRECT YOUR USER TO THE DISCOGS AUTHORIZE PAGE, I’ve created this piece of code: But I got this error: but I get this error: Answer The error provided indicates that your
Tag: rest
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast or BeanUtils.copyProperties not working
am new to JPA and springboot unable to get the api response when am using @Query param(I try achieve the inner join) Repositoty class: Service class: am getting the ” [Ljava.lang.Object; cannot be cast ” exception after that I have changed to as below: service class foreach added the Object but for the above code am getting null values BeanUtils.copyProperties
How do I work with a REST API in Java that returns a zip file?
I am familiar with the basics of making a GET request in Java using the HttpURLConnection class. In a normal situation where the return type would be a JSON, I’d do something like this: However, the current endpoint I’m trying to work with sends back a zip file containing various types of files. The ‘Content-Type’ in that case would be
how to create client TGT with java cxf
I’m new to the java rest CXF client. I will make various requests to a remote server, but first I need to create a Ticket Granting Ticket (TGT). I looked through various sources but I could not find a solution. The server requests that I will create a TGT are as follows: Content-Type: text as parameter, application / x-www-form-urlencoded as
Searching for issues with Sonarcloud API returns none even though they exist
I am trying to get all the sonar report issues from a branch of a private Sonarcloud project. I do this with the following REST call: If I enter this call normally in the webbrowser or with a postman call, I get this response: So I get the full report with the 1 sonar issue, like it’s shown in the
MessageDigest NoSuchAlgorithmException in Java
So, I’ve cruised through several Stackoverflow threads and other websites as well whilst trying to find a solution to this. I am working on a school assignment that requires the use of an instance of …
SAML – Get attributes from client side or Java ee REST api
I need to get attributes of the account from SAML identity provider. Is there any way to do it from client-side (javascript, browser) or using java ee REST API(JAX-RS)? I have found many tutorials about using SAML but they always describe a process of authorization application(always use server-side and jsp/jsf). I don’t need it. I just want to read attributes
REST API Send multiples errors in a JSON Array at the same time with JAX-RS
I’m learning how to create an API with Java EE and JAX-RS. But I could not find any answer about my problem on internet. I have a route “signup” : Currently, to send all the error message I need, I’m using this: This code send me basically this type of Response: This is what I want, but the code is
Where should I check if username already exist in rest api?
I am creating a rest application using Spring Boot. I’ve got three logical layers: controller, service, and repository. Where should I check if the given username and similar values already exist in the database? In the controller layer, I check user input (length, size, etc.) Can I also check username existence here? For instance: Can I check it in the
How to not persist sqlSession.selectOne returned value?
My goal is to not persist the SqlSession.selectOne returned value. The problem is, if you do a sqlSession.selectOne (using an API endpoint) and then you edit the database directly for example using the MySQL workbench. After you edit the database and do another API endpoint request, the returned value will not change. This is how you recreate the problem: Do