Class: Net::HTTPMethodNotAllowed
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
HTTPClientError ,
HTTPResponse
|
|
Instance Chain:
|
|
Inherits: |
Net::HTTPClientError
|
Defined in: | lib/net/http/responses.rb |
Overview
Response class for Method Not Allowed
responses (status code 405).
The request method is not supported for the requested resource.
This class also includes (indirectly) module HTTPHeader
, which gives access to its methods for getting headers
.
References:
Constant Summary
-
HAS_BODY =
# File 'lib/net/http/responses.rb', line 556true
HTTPHeader
- Included
MAX_FIELD_LENGTH, MAX_KEY_LENGTH
HTTPResponse
- Inherited
CODE_CLASS_TO_OBJ, CODE_TO_OBJ
HTTPClientError
- Inherited
Class Attribute Summary
HTTPResponse
- Inherited
.body_permitted? | true if the response has a body. |
Class Method Summary
HTTPResponse
- Inherited
.each_response_header, .read_status_line, .response_class, | |
.exception_type | internal use only. |
.new | internal use only. |
.read_new | internal use only. |
Instance Attribute Summary
HTTPResponse
- Inherited
#body | Returns the string response body; note that repeated calls for the unmodified body return a cached string: |
#body= | Sets the body of the response to the given value. |
#body_encoding | Returns the value set by body_encoding=, or |
#body_encoding= | Sets the encoding that should be used when reading the body: |
#code | The HTTP result code string. |
#decode_content | Set to true automatically when the request did not contain an Accept-Encoding header from the user. |
#http_version | The HTTP version supported by the server. |
#ignore_eof | Whether to ignore EOF when reading bodies with a specified Content-Length header. |
#message | The HTTP result message sent by the server. |
#uri | The URI used to fetch this response. |
#entity | Alias for HTTPResponse#body. |
#msg | Alias for HTTPResponse#message. |
#uri= |
HTTPHeader
- Included
#chunked? | Returns |
#connection_close? | Returns whether the |
#connection_keep_alive? | Returns whether the |
#content_length | Returns the value of field |
#content_length= | Sets the value of field |
Instance Method Summary
HTTPResponse
- Inherited
#inspect, | |
#read_body | Gets the entity body returned by the remote |
#value | Raises an |
#extracting_encodings_from_meta_elements, #get_attribute, #procdest, #read_body_0, #stream_check, | |
#code_type | response <-> exception relationship. |
#error!, #error_type, #header, #read_header, | |
#reading_body | body. |
#response | header (for backward compatibility only; DO NOT USE). |
#check_bom, #detect_encoding, | |
#inflater | Checks for a supported Content-Encoding header and yields an Inflate wrapper for this response’s socket when zlib is present. |
#read_chunked | read_chunked reads from |
#scanning_meta, #sniff_encoding |
HTTPHeader
- Included
#[] | Returns the string field value for the case-insensitive field |
#[]= | Sets the value for the case-insensitive |
#add_field | Adds value |
#basic_auth | Sets header |
#canonical_each | Alias for HTTPHeader#each_capitalized. |
#content_range | Returns a Range object representing the value of field |
#content_type | Returns the media type from the value of field |
#content_type= | Alias for HTTPHeader#set_content_type. |
#delete | Removes the header for the given case-insensitive |
#each | Alias for HTTPHeader#each_header. |
#each_capitalized | Like |
#each_capitalized_name | Calls the block with each capitalized field name: |
#each_header | Calls the block with each key/value pair: |
#each_key | Alias for HTTPHeader#each_name. |
#each_name | Calls the block with each field key: |
#each_value | Calls the block with each string field value: |
#fetch | With a block, returns the string value for |
#form_data= | Alias for HTTPHeader#set_form_data. |
#get_fields | Returns the array field value for the given |
#key? | Returns |
#main_type | Returns the leading (‘type’) part of the media type from the value of field |
#proxy_basic_auth | Sets header |
#range | Returns an array of Range objects that represent the value of field |
#range= | Alias for HTTPHeader#set_range. |
#range_length | Returns the integer representing length of the value of field |
#set_content_type | Sets the value of field |
#set_form | Stores form data to be used in a |
#set_form_data | Sets the request body to a URL-encoded string derived from argument |
#set_range | Sets the value for field |
#sub_type | Returns the trailing (‘subtype’) part of the media type from the value of field |
#to_hash | Returns a hash of the key/value pairs: |
#type_params | Returns the trailing (‘parameters’) part of the value of field |
#append_field_value, #basic_encode, #capitalize, #set_field, #initialize_http_header, | |
#length | Alias for HTTPHeader#size. |
#size | obsolete. |
Constructor Details
This class inherits a constructor from Net::HTTPResponse