blob: f2e263cac775b5e7a7dec116b174a6b264342598 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include <string.h>
#include "shipping.h"
void headers(struct shipping *shipping, const char *fields[], char *provisions[])
{
shipping->headers = NULL;
while (*fields) {
char header[strlen(*fields) + strlen(*provisions) + 2];
sprintf(header, "%s:%s", *fields++, *provisions++);
shipping->headers = curl_slist_append(shipping->headers, header);
}
}
|