viewpoint-particle

Author Topic: HTTP verbs - OPTIONS  (Read 4033 times)

atlanta1213

  • Newbie
  • *
  • Posts: 12
HTTP verbs - OPTIONS
« on: March 06, 2014, 09:18:39 am »
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

  • Newbie
  • *
  • Posts: 12
Re: HTTP verbs - OPTIONS
« Reply #1 on: March 06, 2014, 09:23:49 am »
Could this be a job for the WINHTTP object instead?

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Deana F.
Technical Support
Wilson WindowWare Inc.

atlanta1213

  • Newbie
  • *
  • Posts: 12
Re: HTTP verbs - OPTIONS
« Reply #3 on: March 06, 2014, 05:56:41 pm »
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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: HTTP verbs - OPTIONS
« Reply #4 on: March 06, 2014, 08:58:52 pm »
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
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

  • Newbie
  • *
  • Posts: 12
Re: HTTP verbs - OPTIONS
« Reply #5 on: March 07, 2014, 03:44:20 am »
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.