Sha256: a7c25cabdb635f0a0c827d902a5de609e50fe47faba7896219dde26eeac489ed

Contents?: true

Size: 555 Bytes

Versions: 3

Compression:

Stored size: 555 Bytes

Contents

<%- assert_locals method -%>

uri, <%= method.rest.body_var_name %>, <%= method.rest.query_string_params_var_name %> = <%= method.rest.transcoding_helper_name %> request_pb
response = @client_stub.make_<%= method.rest.verb %>_request(
  uri:     uri,
<%- if method.rest.body? -%>
  body:    body,
<%- end -%>
<%- if method.rest.query_string_params? -%>
  params:  query_string_params,
<%- end -%>
  options: options
)
result = <%= method.return_type %>.decode_json response.body, ignore_unknown_fields: true

yield result, response if block_given?
result

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gapic-generator-0.11.0 templates/default/service/rest/service_stub/method/def/_response.erb
gapic-generator-0.10.1 templates/default/service/rest/service_stub/method/def/_response.erb
gapic-generator-0.10.0 templates/default/service/rest/service_stub/method/def/_response.erb