public class HttpResponses
extends org.kohsuke.stapler.HttpResponses
HttpResponse
implementations.
This class extends from Stapler so that we can move implementations from here to Stapler periodically.
Constructor and Description |
---|
HttpResponses() |
Modifier and Type | Method and Description |
---|---|
static org.kohsuke.stapler.HttpResponse |
errorJSON(String message)
Set the response as an error response.
|
static org.kohsuke.stapler.HttpResponse |
errorJSON(String message,
net.sf.json.JSONArray data)
Set the response as an error response plus some data.
|
static org.kohsuke.stapler.HttpResponse |
errorJSON(String message,
net.sf.json.JSONObject data)
Set the response as an error response plus some data.
|
static org.kohsuke.stapler.HttpResponse |
errorJSON(String message,
Map<?,?> data)
Set the response as an error response plus some data.
|
static org.kohsuke.stapler.HttpResponse |
okJSON()
Create an empty "ok" response.
|
static org.kohsuke.stapler.HttpResponse |
okJSON(net.sf.json.JSONArray data)
Create a response containing the supplied "data".
|
static org.kohsuke.stapler.HttpResponse |
okJSON(net.sf.json.JSONObject data)
Create a response containing the supplied "data".
|
static org.kohsuke.stapler.HttpResponse |
okJSON(Map<?,?> data)
Create a response containing the supplied "data".
|
static org.kohsuke.stapler.HttpResponse |
staticResource(File f) |
error, error, error, errorWithoutStack, forbidden, forwardToPreviousPage, forwardToView, forwardToView, html, literalHtml, notFound, ok, plainText, redirectTo, redirectTo, redirectToContextRoot, redirectToDot, redirectViaContextPath, redirectViaContextPath, staticResource, staticResource, status, text
public static org.kohsuke.stapler.HttpResponse staticResource(File f) throws IOException
IOException
public static org.kohsuke.stapler.HttpResponse okJSON()
public static org.kohsuke.stapler.HttpResponse okJSON(@NonNull net.sf.json.JSONObject data)
data
- The data.public static org.kohsuke.stapler.HttpResponse okJSON(@NonNull net.sf.json.JSONArray data)
data
- The data.public static org.kohsuke.stapler.HttpResponse okJSON(@NonNull Map<?,?> data)
data
- The data.public static org.kohsuke.stapler.HttpResponse errorJSON(@NonNull String message)
message
- The error "message" set on the response.this
object.public static org.kohsuke.stapler.HttpResponse errorJSON(@NonNull String message, @NonNull Map<?,?> data)
message
- The error "message" set on the response.data
- The data.this
object.public static org.kohsuke.stapler.HttpResponse errorJSON(@NonNull String message, @NonNull net.sf.json.JSONObject data)
message
- The error "message" set on the response.data
- The data.this
object.public static org.kohsuke.stapler.HttpResponse errorJSON(@NonNull String message, @NonNull net.sf.json.JSONArray data)
message
- The error "message" set on the response.data
- The data.this
object.Copyright © 2004–2022. All rights reserved.