Class: Resto::Format::Plain

Inherits:
Object
  • Object
show all
Extended by:
Resto::Format
Defined in:
lib/resto/format/plain.rb

Overview

This class is used when sending plain text requests.

Class Method Summary collapse

Methods included from Resto::Format

accept, content_type, decode, encode, extension, get

Class Method Details

.acceptString

The accept header when sending text data.

Example:

headers["accept"] = Resto::Format::Plain.accept

Returns:

  • (String)

    “text/plain, /



18
# File 'lib/resto/format/plain.rb', line 18

def accept;        'text/plain, */*';   end

.content_typeString

The content-type header when sending text data.

Example:

headers["content-type"] = Resto::Format::Plain.content_type

Returns:

  • (String)

    “text/plain”



27
# File 'lib/resto/format/plain.rb', line 27

def content_type;  'text/plain';        end