Skip to content
/ restlib-go Public archive

Simple REST Library writen in GO for use in C/C++ projects

Notifications You must be signed in to change notification settings

gameap/restlib-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple REST Library writen in GO for use in C/C++ projects

Usage

#include <stdio.h>
#include <stdlib.h>

#include "request.h"
#include "response.h"

extern Response DoRequest(Request request);

int main() {
    Request request = {
        .Method     = GET,
        .URL        = "http://example.com",
        .Header     = "Accept: application/json",
        .UserAgent  = "rest-c",
    };

    struct Response response = DoRequest(request);

    printf("error: %s \n", response.Error);
    printf("statusCode: %d \n", response.StatusCode);
    printf("body: %s \n", response.Body);
}

About

Simple REST Library writen in GO for use in C/C++ projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published