Sha256: 83b924374474f79b75b4d073efc9f0a1c4ad6c0d0d6a021f5f656e915a066b17
Contents?: true
Size: 690 Bytes
Versions: 172
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true module Aws module Stubbing module Protocols class RestJson < Rest def body_for(_a, _b, rules, data) if eventstream?(rules) encode_eventstream_response(rules, data, Aws::Json::Builder) else Aws::Json::Builder.new(rules).serialize(data) end end def stub_error(error_code) http_resp = Seahorse::Client::Http::Response.new http_resp.status_code = 400 http_resp.body = <<-JSON.strip { "code": #{error_code.inspect}, "message": "stubbed-response-error-message" } JSON http_resp end end end end end
Version data entries
172 entries across 172 versions & 1 rubygems