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 |
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, notFound, ok, plainText, redirectTo, redirectTo, redirectToContextRoot, redirectToDot, redirectViaContextPath, redirectViaContextPath, staticResource, staticResource, status
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.Copyright © 2004–2017. All rights reserved.