[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Perform a "HEAD" operation
I want to perform a "HEAD" operation to get only the header information
back.
The idea is just to check if the object ( in this case: a picture)
exists on the server.
The way I try to do this is:
- http_persist_open()
- http_persist_req()
- http_persist_close()
Testing with
URL = 'http://www.wikipedia.de/img/logo.png';
wwComm = http_persist_open( URL );
rc = http_persist_req(`HEAD' :wwComm :URL :0 :*NULL :*NULL :0 :0 :*NULL
);
Will return rc= -1 ,but the debug log shows: "HTTP/1.1 200 OK"
My questions are:
- Can I do:
rc = http_persist_req(`HEAD' :wwComm :URL :0 :*NULL :*NULL :0 :0 :*NULL
);
To receive a return code "200" if the object exists.
And to get additional header information:
wrkHeaderInfo = http_header(`Name:');
- Or do I have to define the parameters "peSaveFD" and
"peSaveProc" to the http_persist_req() ?
And if yes, how should the parameter list for the "peSaveProc" look
like?
Any help and example is appreciated.
Hannes
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------