I've manually ported some WinHTTP interfaces into a FreeBasic .bi file, which can be found here
Also created a http client module and his .bi file
Now this code:
Code: Select all
#INCLUDE "libs/http-client.bi"
DIM AS STRING Content, RequestUrl
RequestUrl = COMMAND(1)
HTTP_Open("GET", RequestUrl)
HTTP_Send()
Content = HTTP_GetResponse()
HTTP_Clean()
IF Content <> "" THEN
Print Content
ELSE
Print LastError
END IF
Code: Select all
fbc -x .\test.exe -l winhttp test.bas libs/http-client.bas
Code: Select all
libs\http-client.bas(119) warning 3(1): Passing different pointer types, at parameter 4 of WINHTTPSENDREQUEST()
libs\http-client.bas(159) warning 3(1): Passing different pointer types, at parameter 2 of WINHTTPREADDATA()
Regards.