You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
585 B
C

#include "mastodon_api.h"
#include "http_request.h"
#include <stdio.h>
#include <stdlib.h>
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;
}