Skip to content

Commit dbd9f92

Browse files
committed
update:rest example
1 parent 0da204e commit dbd9f92

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

XEngine_APPClient/APPClient_RestApi/APPClient_RestApi.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ using namespace std;
3434

3535
XCHAR tszBaseBuffer[MAX_PATH];
3636
XCHAR tszHdrBuffer[MAX_PATH];
37+
void API_Manage_Bucket()
38+
{
39+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Bucket");
40+
int nLen = 0;
41+
int nCode = 0;
42+
XCHAR* ptszMsgBuffer = NULL;
43+
44+
if (!APIClient_Http_Request(_X("POST"), lpszUrl, NULL, &nCode, &ptszMsgBuffer, &nLen, tszHdrBuffer))
45+
{
46+
_xtprintf("API_Manage_Bucket:%lX\n", APIClient_GetLastError());
47+
return;
48+
}
49+
_xtprintf("API_Manage_Bucket:%d,%s\n", nCode, ptszMsgBuffer);
50+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
51+
}
3752
//查询
3853
void API_Manage_Query()
3954
{
@@ -175,6 +190,7 @@ int main()
175190
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
176191
#endif
177192

193+
API_Manage_Bucket();
178194
API_Manage_Query();
179195
API_Manage_Insert();
180196
API_Manage_Delete();

0 commit comments

Comments
 (0)