Mercurial
view playground/main.c @ 151:c033667da5f9 hg-web
Merging latest merge into hg-web
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Sat, 10 Jan 2026 13:35:09 -0800 |
| parents | 6de849867459 |
| children | 827c6ac504cd |
line wrap: on
line source
#include "seobeo/seobeo.h" int main(int argc, char *argv[]) { Seobeo_Client_Request *p_req = Seobeo_Client_Request_Create("http://127.0.0.1:4444/file/tip?style=json"); Seobeo_Client_Request_Add_Header_Array(p_req, "User-Agent: Seobeo/1.0 (Array Mode)"); Seobeo_Client_Request_Add_Header_Array(p_req, "Accept: application/json"); Seobeo_Client_Request_Add_Header_Array(p_req, "X-Test-Header: TestValue"); Seobeo_Client_Response *p_resp = Seobeo_Client_Request_Execute(p_req); if (p_resp) { printf("Status: %d\n", p_resp->status_code); if (p_resp->body) printf("Response:\n%s\n", p_resp->body); Seobeo_Client_Response_Destroy(p_resp); } else printf("Request failed\n"); Seobeo_Client_Request_Destroy(p_req); }