Sha256: 1c1173ae3c4e2062853910d9152c377ddcfa8e05c6f4346c7616b734d87eed73
Contents?: true
Size: 237 Bytes
Versions: 5
Compression:
Stored size: 237 Bytes
Contents
# frozen_string_literal: true require 'json' def response(data = nil, opts = {}) if data opts.merge! body: JSON.dump(data) opts[:headers] ||= {} opts[:headers].merge! 'Content-Type' => 'application/json' end opts end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
acfs-1.6.0 | spec/support/response.rb |
acfs-1.5.1 | spec/support/response.rb |
acfs-1.5.0 | spec/support/response.rb |
acfs-1.4.0 | spec/support/response.rb |
acfs-1.3.4 | spec/support/response.rb |