Sha256: f8076ac2c1389a676a3701add5abf70027b05c24c5a29a55d8f6f6360900f164
Contents?: true
Size: 206 Bytes
Versions: 138
Compression:
Stored size: 206 Bytes
Contents
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
138 entries across 138 versions & 1 rubygems