Ruby
Ruby request method
get
https://neko-love.xyz
/api/v1/:endpoint
Get Endpoint

Example:

require 'net/http'
require 'uri'
require 'json'
def nekoGET(url)
return JSON.parse(Net::HTTP.get_response(URI(url)).body)
rescue StandardError => e
return { "error" => "failed to get response : #{e.message}" }
end
#Methode call function "api_get"
nekoGET("https://neko-love.xyz/api/v1/neko")["url"]
Last modified 2yr ago
Copy link
Outline
get
Get Endpoint