private static HttpMethod valueOf ( String method ) { try { return HttpMethod . valueOf ( method ) ; } catch ( IllegalArgumentException e ) { } return null ; }
Provides a save way of obtaining the HttpMethod from a String . If the method is invalid returns null .