question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide annotated services a way to return a successful response with alternative status code

See original GitHub issue

For example:

@Get("/hello")
public String greet() {
    return "world"; // A user wants to send a non-200 response, but how?
}

Related: https://github.com/line/centraldogma/pull/141#discussion_r173067177

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hyangtackcommented, Mar 13, 2018

I think that we need to introduce some class like Spring’s ResponseEntity to make the response flexible.

0reactions
hyangtackcommented, Jan 11, 2019

Closed via #1509

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Return HTTP Status Codes in a Spring Boot Application
In this guide, we'll take a look at how to return HTTP status codes in Spring Boot applications with @ResponseStatus, ResponseEntity and ...
Read more >
Status codes in HTTP - W3C
Following a POST command, this indicates success, but the textual part of the response line indicates the URI by which the newly created...
Read more >
Return a Specific HTTP Response Status in Spring - amitph
This tutorial demonstrates how to return a specific HTTP Response Status from a controller in Spring or Spring Boot Application.
Read more >
JAX-RS — How to return JSON and HTTP status code together?
One approach is to use the response object just like described above and set the body of the request yourself. However, by doing...
Read more >
Default Response Codes | RESTful Java with JAX ... - dennis-xlc
Let's examine what the response codes would be for both success and error conditions for the following JAX-RS resource class: @Path("/customers") public ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found