Axis APPINT Manual de integración - Página 7
Navegue en línea o descargue pdf Manual de integración para Servidor Axis APPINT. Axis APPINT 10 páginas. Application integration
2. Create an HTTP handle by calling the InternetConnect function with the
necessary parameters:
HINTERNET anHTTPHandle =
InternetConnect(anInetHandle,
3. Use the HTTP handle to open a request. The second parameter indicates that it is
a
request and the third indicates that the target is the '/user/scan/scan.shtml'
page. By default, redirect responses are handled automatically:
HINTERNET anHttpRequest =
HttpOpenRequest(anHTTPHandle,
4. Add an HTTP header which informs the HTTP server that the request contains
encoded data:
char aReqStr[] =
"Content-type: application/x-www-form-urlencoded";
HttpAddRequestHeaders(anHttpRequest,
5. Create a query string containing the parameters you want to send and send the
request:
char aQeryStr[] =
"\n\npage=scan&profileName=Color+low&scanNow=";
HttpSendRequest(anHttpRequest,
"171.16.1.185",
INTERNET_DEFAULT_HTTP_PORT,
"root",
"pass",
INTERNET_SERVICE_HTTP,
0,
0);
"POST",
"/user/scan/scan.shtml",
NULL,
NULL,
NULL,
0,
0);
aReqStr,
strlen(aReqStr),
0)
0,
0,
aQeryStr,
strlen(aQeryStr))
7