WindowsAPI(Win32API) Advent Calendar 2015 21日目
WindowsAPI(Win32API) Advent Calendar 2015 - Adventar
HttpSendRequestは、HTTPリクエストを送信するWindowsAPI・・・。
HttpSendRequest function (Windows)
HttpOpenRequestで作成したリクエストをこれで送信する・・・。
リクエストのハンドル、ヘッダなどを指定・・・。今回、ヘッダはなし・・・。
InternetReadFileにリクエストハンドルとバッファを指定すると、レスポンスを読み込める・・・。
hInternet = 00cc0004 hSession = 00cc0008 hRequest = 00cc000c <html> <head> <title>Hello, Internet!</title> </head> <body> <h1>Hello, Internet!</h1> </body </html> 続行するには何かキーを押してください . . .
こんな感じで、レスポンスを読み込めた・・・。
Sample/HttpSendRequest.cpp at master · bg1bgst333/Sample · GitHub