HTTP verbs - OPTIONS

Started by atlanta1213, March 06, 2014, 09:18:39 AM

Previous topic - Next topic

atlanta1213

I am trying to connect to a web site and make an OPTIONS request.  I am not sure if I can or how to set the HTTP verb I want to use, in this case OPTIONS

My example is:

https://websitename/Microsoft-Server-ActiveSync?User=mailtest HTTP/1.1 with the following Headers

User-Agent:string
Authorization:Basic  username and password as a Base64 string

I can get this done in Fiddler Web Debugger and get a 200 response but I am having trouble getting this done in Winbatch.

I have set the Headers and url and then used iBegin, iHostConnect and iHTTPInit without getting any errors but when i use iHttpOpen i am receiving an error.

atlanta1213

Could this be a job for the WINHTTP object instead?


atlanta1213

Thanks for the article links - the base64 from clear text UDF will be very helpful.  I guess my issue appears to be the iHttpInit function only accepts two verbs, GET and POST and I need to send OPTIONS.  I will explore the WinHttp options further.

Deana

Ah now I think I understand. You may want to take a look at the WinInet function iOptionSet. It allows your to specify the

Code (winbatch) Select
user_agent: User Agent for HTTP transfers
username: Server authentication required. Username for iHostConnect
password: Server authentication required. Password for iHostConnect


Deana F.
Technical Support
Wilson WindowWare Inc.

atlanta1213

I was able to get it to work using snippets from the second of your two links.  Using the WinHtttp object allowed me to send a properly formatted OPTIONS request along with the necessary Headers and I was able to return the response headers to Winbatch.  Thanks for all your help. In a nutshell I was trying to connect and verify that a Microsoft Exchange Server's Active Sync (EAS) was listening and responding appropriately.