Skip to content

shanusehlot/http-request-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Simple HTTP Request Bot

This is a small C++ tool I put together for the GSoC evaluation task. It reads a list of URLs from a JSON file, fetches them using libcurl, and shows a quick preview of what it found.

How to build it

You'll need cmake, libcurl, and the nlohmann-json library. If you're on a Mac, you can just grab them with brew:

brew install curl nlohmann-json cmake

Then just follow the usual cmake flow:

mkdir build
cd build
cmake ..
make

Running it

Once you've built it, you can run it by passing the config file:

./httpbot ../config.json

How it works

  1. Config: It uses nlohmann/json to parse your settings.
  2. Requests: It uses libcurl for the heavy lifting. I set it to follow redirects and time out after 10 seconds so it doesn't get stuck.
  3. Bot Name: It uses the bot_name from your JSON as the User-Agent string.
  4. Preview: It prints the HTTP status code and the first few lines of the response just to show it's working.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors