Requestify

A simple CLI utility for generating http requests for different languages and libraries.

Usage Example

WindowsTerminal_PMLxNUEjeV.mp4

Output

std::string ExportedRequest(std::string_view szUsername, std::string_view szPassword) {
 CURL *curl;
 curl = curl_easy_init();

 std::string szRequest = "https://cheat.company"
 std::string szResponse;

 std::string szPost;

 szPost += "username=" + szUsername;
 szPost += "&password=" + szPassword;

 curl_easy_setopt( curl, CURLOPT_CUSTOMREQUEST, "POST");
 curl_easy_setopt( curl, CURLOPT_POSTFIELDS, szPost.c_str( ) );
 curl_easy_setopt( curl, CURLOPT_POSTFIELDSIZE, szPost.size( ) );
 curl_easy_setopt( curl, CURLOPT_URL, szRequest.c_str( ) );
 curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, writeFunction );
 curl_easy_setopt( curl, CURLOPT_WRITEDATA, &szResponse );

 curl_easy_perform( curl );
 curl_easy_cleanup( curl );

 return szResponse;
}

GitHub

View Github