def header(name, data)
      fail(Mailgun::ParameterError, 'Header name for message must be specified') if name.to_s.empty?
      begin
        jsondata = make_json data
        set_single("h:#{name}", jsondata)
      rescue Mailgun::ParameterError
        set_single("h:#{name}", data)
      end
    end
def header(name, data)
      fail(Mailgun::ParameterError, 'Header name for message must be specified') if name.to_s.empty?
      begin
        jsondata = make_json data
        set_single("h:#{name}", jsondata)
      rescue Mailgun::ParameterError
        set_single("h:#{name}", data)
      end
    end
Add custom data to the message. The data should be either a hash or JSON
 encoded. The custom data will be added as a header to your message.

 @param [string] name A name for the custom data. (Ex. X-Mailgun-<Name of Data>: {})
 @param [Hash] data Either a hash or JSON string.
 @return [void]