Top Description Methods
org.apache.http

public Interface ReasonPhraseCatalog

Known Direct Implementers
org.apache.http.impl.EnglishReasonPhraseCatalog
Imports
java.util.Locale

Interface for obtaining reason phrases for HTTP status codes.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the reason phrase, or null if unknown
getReason
(int
the status code, in the range 100-599
status
,
Locale
the preferred locale for the reason phrase
loc
)

Obtains the reason phrase for a status code.

Method Detail

getReasonback to summary
public String getReason(int status, Locale loc)

Obtains the reason phrase for a status code. The optional context allows for catalogs that detect the language for the reason phrase.

Parameters
status:int

the status code, in the range 100-599

loc:Locale

the preferred locale for the reason phrase

Returns:String

the reason phrase, or null if unknown