Sha256: 0a767dd8c656a047ef9812914014b03f36519b93d0870cb30cbf9e5c4567ab3e

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

<%- assert_locals method -%>

uri, <%= method.rest.body_var_name %>, <%= method.rest.query_string_params_var_name %> = <%= method.rest.transcoding_helper_name %> request
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

5 entries across 5 versions & 1 rubygems

Version Path
gapic-generator-0.9.1 templates/default/service/rest/client/method/def/_response_normal.erb
gapic-generator-0.9.0 templates/default/service/rest/client/method/def/_response_normal.erb
gapic-generator-0.8.0 templates/default/service/rest/client/method/def/_response_normal.erb
gapic-generator-0.7.5 templates/default/service/rest/client/method/def/_response_normal.erb
gapic-generator-0.7.4 templates/default/service/rest/client/method/def/_response_normal.erb