summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-09 20:30:28 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-02-09 20:30:28 +0800
commit86c58f25f5298841d4028e0393b9c49d9e476644 (patch)
tree524ed87b3227f4d4db3857bdcc1c361a5e9e0b9e
parentf62c34690e98b957d97bd853cf8a1e17c3f0343d (diff)
The headers might be lost before
-rw-r--r--request.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/request.c b/request.c
index eedb597..e8dfcf7 100644
--- a/request.c
+++ b/request.c
@@ -136,7 +136,8 @@ void request(void (*handler)(interchange_response *), void (*callback)(void *),
sprintf(post, "%s%s=%s", post, pair.key, pair.value);
}
strcpy(attr.requestMethod, "POST");
- const char *headers[] = { "Content-Type", "application/x-www-form-urlencoded", NULL };
+ static const char *headers[] = { "Content-Type",
+ "application/x-www-form-urlencoded", NULL };
attr.requestHeaders = headers;
attr.requestData = post;
attr.requestDataSize = length + 1;