WinBatch Technical Support Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Current release
:
2023C (6.23CWC)
Home
Help
Search
Tech Database
Documentation
Downloads
Hints
Login
Register
WinBatch® Technical Support Forum
»
All Things WinBatch
»
WinBatch
»
HTTP verbs - OPTIONS
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: HTTP verbs - OPTIONS (Read 4933 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.
Logged
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?
Logged
Deana
Wilson WindowWare Tech Support
Pundit
Posts: 1183
WinBatch® can do it.
Re: HTTP verbs - OPTIONS
«
Reply #2 on:
March 06, 2014, 10:03:58 am »
Here are some tech article that might help:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/How~To+HTTP~Authentication.txt
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/WinHttpRequest+Sending~an~API-Key~using~WinHttp.txt
Logged
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.
Logged
Deana
Wilson WindowWare Tech Support
Pundit
Posts: 1183
WinBatch® can do it.
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
Logged
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.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
WinBatch® Technical Support Forum
»
All Things WinBatch
»
WinBatch
»
HTTP verbs - OPTIONS