39#include <sys/socket.h>
40#include <netinet/in.h>
43#include "utilities/qfile.h"
44#include "utilities/qsystem.h"
54const char *
qgetenv(
const char *envname,
const char *defstr) {
55 const char *envstr = getenv(envname);
56 return (envstr) ? envstr : defstr;
72 FILE *fp = popen(
cmd,
"r");
void * qfile_read(FILE *fp, size_t *nbytes)
Read data from a file stream.
static void * cmd(qhttpclient_t *client, const char *method, const char *uri, void *data, size_t size, int *rescode, size_t *contentslength, qlisttbl_t *reqheaders, qlisttbl_t *resheaders)
qhttpclient->cmd(): Sends a custom request(method) to the remote host and reads it's response.
const char * qgetenv(const char *envname, const char *defstr)
Get system environment variable.
char * qsyscmd(const char *cmd)
Get the result string of external command execution.