Example usage for com.google.common.net HttpHeaders ALLOW

List of usage examples for com.google.common.net HttpHeaders ALLOW

Introduction

In this page you can find the example usage for com.google.common.net HttpHeaders ALLOW.

Prototype

String ALLOW

To view the source code for com.google.common.net HttpHeaders ALLOW.

Click Source Link

Document

The HTTP Allow header field name.

Usage

From source file:org.sonatype.nexus.repository.http.HttpResponses.java

public static Response methodNotAllowed(final String methodName, final String... allowedMethods) {
    checkNotNull(methodName);//from w  w  w . j a va  2s  .  c  o m
    checkNotNull(allowedMethods);
    checkArgument(allowedMethods.length != 0);
    return new Response.Builder().status(Status.failure(METHOD_NOT_ALLOWED, methodName))
            .header(HttpHeaders.ALLOW, Joiner.on(',').join(allowedMethods)).build();
}