class HTTPX::Transcoder::JSON::Encoder

  1. lib/httpx/transcoder/json.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. content_type

Public Class methods

new(json)
[show source]
   # File lib/httpx/transcoder/json.rb
32 def initialize(json)
33   @raw = JSON.json_dump(json)
34   @charset = @raw.encoding.name.downcase
35 end

Public Instance methods

content_type()
[show source]
   # File lib/httpx/transcoder/json.rb
37 def content_type
38   "application/json; charset=#{@charset}"
39 end