trail is a small, minimal, and easy-to-use HTTP library written in C that supports GET and POST requests.
Features |
---|
Sending GET requests |
Sending POST requests |
- How to use functions:
- Sending GET request
requests_get(int port, char *website, char *directory);
Parameters: (port, website, directory) - Sending POST request
requests_post(int port, char *website, char *directory, char *post_data);
Parameters: (port, website, directory, data)
- Sending GET request
#include <stdio.h>
#include <stdlib.h>
#include "../includes/trail/trail.h"
/*
* example/main.c
* Date: 12/6/21
* Author: 0x1CA3
*/
int main(void) {
requests_get(80, "example.com", NULL);
return EXIT_SUCCESS;
}
Steps for compiling & running:
install.sh
gcc -o <binary> <source_file> trail.so
https://github.com/0x1CA3