Tiago 822568b664
ruby client adapter for httpx (#16718)
* added isTyphoeus property to remove negations on isFaraday

* adding httpx support as alternative library for ruby client

* updated samples
2023-10-05 12:17:18 +08:00

1.2 KiB

Petstore::DefaultApi

All URIs are relative to http://petstore.swagger.io:80/v2

Method HTTP request Description
foo_get GET /foo

foo_get

foo_get

Examples

require 'time'
require 'petstore'

api_instance = Petstore::DefaultApi.new

begin
  
  result = api_instance.foo_get
  p result
rescue Petstore::ApiError => e
  puts "Error when calling DefaultApi->foo_get: #{e}"
end

Using the foo_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> foo_get_with_http_info

begin
  
  data, status_code, headers = api_instance.foo_get_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FooGetDefaultResponse>
rescue Petstore::ApiError => e
  puts "Error when calling DefaultApi->foo_get_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

FooGetDefaultResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json