Merge pull request #239 from glyptodon/fix-mimetypes

GUAC-1294: Use mimetype text/plain for REST endpoints which return plain strings.
This commit is contained in:
James Muehlner
2015-08-11 09:53:50 -07:00
3 changed files with 3 additions and 0 deletions

View File

@@ -241,6 +241,7 @@ public class ConnectionRESTService {
* If an error occurs while creating the connection. * If an error occurs while creating the connection.
*/ */
@POST @POST
@Produces(MediaType.TEXT_PLAIN)
@AuthProviderRESTExposure @AuthProviderRESTExposure
public String createConnection(@QueryParam("token") String authToken, public String createConnection(@QueryParam("token") String authToken,
APIConnection connection) throws GuacamoleException { APIConnection connection) throws GuacamoleException {

View File

@@ -193,6 +193,7 @@ public class ConnectionGroupRESTService {
* If an error occurs while creating the connection group. * If an error occurs while creating the connection group.
*/ */
@POST @POST
@Produces(MediaType.TEXT_PLAIN)
@AuthProviderRESTExposure @AuthProviderRESTExposure
public String createConnectionGroup(@QueryParam("token") String authToken, public String createConnectionGroup(@QueryParam("token") String authToken,
APIConnectionGroup connectionGroup) throws GuacamoleException { APIConnectionGroup connectionGroup) throws GuacamoleException {

View File

@@ -225,6 +225,7 @@ public class UserRESTService {
* @return The username of the newly created user. * @return The username of the newly created user.
*/ */
@POST @POST
@Produces(MediaType.TEXT_PLAIN)
@AuthProviderRESTExposure @AuthProviderRESTExposure
public String createUser(@QueryParam("token") String authToken, APIUser user) public String createUser(@QueryParam("token") String authToken, APIUser user)
throws GuacamoleException { throws GuacamoleException {