#include "mastodon_api.h" #include "http_request.h" #include #include bool route_mastodon_api( struct http_request* req ) { if( http_request_route( req, "apps" ) ) { if( http_request_route_method( req, "POST" ) ) { FILE* data = http_request_get_request_data( req ); printf( "OAuth2 app\n" ); // http_request_get_header( "Content-Length" ); //while( -1 != getline( &line, &size, data ) ) { char ch; while( (ch = fgetc(data) ) != EOF ) { printf( "%c", ch ); fflush(stdout); } printf( "End of file\n" ); } } return false; }