diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-09 20:30:28 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-09 20:30:28 +0800 |
commit | 86c58f25f5298841d4028e0393b9c49d9e476644 (patch) | |
tree | 524ed87b3227f4d4db3857bdcc1c361a5e9e0b9e | |
parent | f62c34690e98b957d97bd853cf8a1e17c3f0343d (diff) |
The headers might be lost before
-rw-r--r-- | request.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |