class Object
Constants
- API_VERSION
- BETTER_SIGNATURE
Public Instance Methods
parse_postman_headers(headers)
click to toggle source
# File lib/better_rest.rb, line 42 def parse_postman_headers(headers) header_hash = {} header_list = headers.strip.split(': ') keys = header_list.select.each_with_index { |str, i| i.even? } values = header_list.select.each_with_index { |str, i| i.odd? } keys.each_with_index do |key, index| header_hash[key] = values[index] end header_hash end