Skip to content
Advertisement

Tag: api

POST: Exception Status expected: but was:

Technically it should be a simple task, but I can’t find the error. I want to write a normal “POST method”, but when I tested it, it came to a problem: enter code here Status expected:<201> but what:<200>. My question is, why do I get an OK and not a CREATED? CODE: PostMapping in Controller Unit Test Answer Because for

Parsing multiple JSON objects that exist in one line in Java

I’m currently using the OMDB API, which can either return get-queries as JSON objects or XML. Working with JSON is something I’d like to learn, and it generally seems like best solution for what I’m trying to do. The implementation I’m hoping for, is to allow the user to search for a movie, and select the correct one from a

Current time API / Exact time detection via API

Today, for the first time, I am trying to get the right time through the API. I don’t understand‚ please help. I am using the http://worldtimeapi.org/api/timezone/ site to determine the exact time. But I didn’t understand how to use it in JAVA and what codes to write. Please send me a snippet of code or codes. I don’t know what

cannot resolve ‘@GET’ [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question

Java Optional query string paramters and Server side API’s

Here is my requirement: Step Five: Add searching by title This method’s purpose is to enable searching by title. You’ll pass in an optional query string parameter that returns all auctions with the search term in the title. In AuctionController.java, return to the list() action method. Add a String request parameter with the name title_like. You’ll need to make this

How to create APT hosted repository using Nexus OSS API

I am creating nexus repositories using nexus API, but I don’t know how to post multiline field in json. The API to create hosted repository needs GPG key and GPG key has multiline. Help me please. Thank you very much. Answer This was an embarrassing question. When replace “linebreak(n)”, I didn’t consider the operating system. I hope others don’t make

Method to get and post Json object in Vertx

I’m new to Java and to backend development, and I really could use some help. I am currently using Vert.x to develop a server that takes in a Json request that tells this server which file to analyze, and the server analyzes the file and gives a response in a Json format. I have created an ImageRecognition class where there

Advertisement