A quick example of how to use the Thistle Secure Comms library to perform a https call.
Build with the following command, taking the .a
file for your target platform
$ cc -o tsc tsc.c libtsc.a
#include <stdio.h>
#include "../target/tsc.h"
{
printf("Failed to complete request");
} else {
size_t length = 0;
}
return 0;
}
int main()
Definition: malloc.c:19
struct tsc_http_response tsc_http_response
Definition: tsc.h:81
void tsc_http_request_free(struct tsc_http_request *request)
struct tsc_http_session tsc_http_session
Definition: tsc.h:86
void tsc_http_session_free(struct tsc_http_session *session)
struct tsc_http_request * tsc_http_session_get(struct tsc_http_session *session)
void tsc_http_response_free(struct tsc_http_response *response)
const unsigned char * tsc_http_response_body(const struct tsc_http_response *response, uintptr_t *len)
enum tsc_result tsc_http_session_set_url(struct tsc_http_session *session, const char *url)
struct tsc_http_session * tsc_http_session_new(void)
tsc_result
Definition: tsc.h:6
@ TSC_RESULT_OK
Definition: tsc.h:10
enum tsc_result tsc_http_request_send(struct tsc_http_request *request, struct tsc_http_response **response)
struct tsc_http_request tsc_http_request
Definition: tsc.h:76