GameMaker (2.3)
Icon

Request Master

FrostyCat

You must be logged in to obtain assets

Description

Overview

Request Master is a full-featured toolkit for using http_request() to its potential. Send HTTP requests with parameters already encoded for you, instead of manually escaping them and building query strings. The included request helpers also enable handling the response using a callback instead of a separate Async HTTP event.

Features

  • Send requests in properly encoded application/x-www-form-urlencoded, multipart/form-data and application/json formats
  • Binary-safe file downloading with optional header and SHA1 validation support
  • Inline support for headers, no need for an extra map
  • Automatic parsing for JSON responses
  • Intuitive response handling with callbacks

Documentation

See the Wiki section on the official GitHub repository.

Example

Accessing Steam API:

xhr_get("https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/", {
    params: { appid: 282800, count: 1 },
    done: function(res) {
        show_message("Latest news from 100% Orange Juice: " + res.data.appnews.newsitems[0].title);
    },
    fail: function() {
        show_message("Can't fetch headlines from Steam.");
    }
});

Downloading a file:

xhr_download("http://web.archive.org/web/20060821000040im_/http://gamemaker.nl/images/header.jpg", working_directory + "gmlegacy.jpg", {
    done: function(res) {
        sprite_index = sprite_add(res.file, 1, false, false, 0, 0);
    },
    fail: function(res) {
        show_message_async("Failed to download the image!");
    }
});

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS2.3 - Version 1.2.2. Published July 17, 2022

v1.2.2 - Opera GX Maintenance Release

  • Fix browser detection to count Opera GX export as a browser and apply HTML5-related adaptations there.
Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait