Class: Aws::Crt::Http::Headers
- Inherits:
-
Object
- Object
- Aws::Crt::Http::Headers
- Includes:
- ManagedNative
- Defined in:
- lib/aws-crt/http/headers.rb
Overview
HTTP Headers
Instance Method Summary collapse
-
#initialize(headers = {}) ⇒ Headers
constructor
A new instance of Headers.
- #to_blob_strings ⇒ Object
Methods included from ManagedNative
included, #manage_native, #native, #native_set?, #release
Constructor Details
#initialize(headers = {}) ⇒ Headers
Returns a new instance of Headers.
14 15 16 17 18 19 20 21 22 |
# File 'lib/aws-crt/http/headers.rb', line 14 def initialize(headers = {}) blob = StringBlob.encode(headers.flatten) blob_ptr = FFI::MemoryPointer.new(:char, blob.length) blob_ptr.write_array_of_char(blob) manage_native do Aws::Crt::Native.http_headers_new_from_blob(blob_ptr, blob.length) end end |