Method: Minecraft::JSONAPIv2::Request#make_request
- Defined in:
- lib/minecraft_jsonapiv2/request.rb
#make_request(options) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/minecraft_jsonapiv2/request.rb', line 13 def make_request() url = Minecraft::JSONAPIv2::BASE_URI % {host: @host, port: @port} request = generate_array_for_json( generate_request() ).to_json response = HTTParty.post(url, body: request, headers: {'Content-Type' => 'application/json'} ) @json = [] @req = [] response.body end |