Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Question about IE vs. Firefox API support using Excel VBA
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dhfan2  
View profile  
 More options Jan 16 2009, 3:05 pm
From: dhfan2 <bo.r...@gmail.com>
Date: Fri, 16 Jan 2009 12:05:08 -0800 (PST)
Local: Fri, Jan 16 2009 3:05 pm
Subject: Question about IE vs. Firefox API support using Excel VBA
I'm trying to use the winhttp COM component from Excel to login into
hiveminder.com, but haven't succeeded yet.

Before trying to debug why I can't login, I've noticed a discrepancy.
Firefox returns a simpler HTML page and IE seems to redirect when I
just manually enter "http://hiveminder.com/=/action/BTDT.Action.Login"
into each browser.  I'm using the latest browsers on MS Vista Business
32.

I'm trying to automate the retrieval and posting of tasks using the HM
API.  So far, this is what I have in my VBA module:

Option Explicit
Private Enum WinHttpRequestOption
  WinHttpRequestOption_UserAgentString
  WinHttpRequestOption_URL
  WinHttpRequestOption_URLCodePage
  WinHttpRequestOption_EscapePercentInURL
  WinHttpRequestOption_SslErrorIgnoreFlags
  WinHttpRequestOption_SelectCertificate
  WinHttpRequestOption_EnableRedirects
  WinHttpRequestOption_UrlEscapeDisable
  WinHttpRequestOption_UrlEscapeDisableQuery
  WinHttpRequestOption_SecureProtocols
  WinHttpRequestOption_EnableTracing
  WinHttpRequestOption_RevertImpersonationOverSsl
  WinHttpRequestOption_EnableHttpsToHttpRedirects
  WinHttpRequestOption_EnablePassportAuthentication
  WinHttpRequestOption_MaxAutomaticRedirects
  WinHttpRequestOption_MaxResponseHeaderSize
  WinHttpRequestOption_MaxResponseDrainSize
  WinHttpRequestOption_EnableHttp1_1
  WinHttpRequestOption_EnableCertificateRevocationCheck
End Enum

Public Function DoLogin()
Dim oReq As WinHttpRequest, uMsg$
Set oReq = New WinHttp.WinHttpRequest

Const HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0
Const HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 1

oReq.Option(WinHttpRequestOption_EnableHttpsToHttpRedirects) = CVar
(True) 'added to see if prob fixed:not fixed
oReq.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = &H3300 'added
to see if prob fixed:not fixed

oReq.Open "GET", "http://hiveminder.com/=/action/BTDT.Action.Login",
False
'oReq.setRequestHeader "Cookie", "JIFTY_SID_HIVEMINDER=$COOKIE"
oReq.send
'Debug.Print oReq.getAllResponseHeaders
'Debug.Print oReq.responseText

 With oReq
     .Open "post", "http://hiveminder.com/=/action/BTDT.Action.Login",
False
     .setRequestHeader "Content-Type", "application/x-www-form-
urlencoded"
     .SetCredentials "myem...@gmail.com", "mypassword",
HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
     uMsg = "address=myem...@gmail.com&password=mypassword"
    .send uMsg
    Debug.Print oReq.statusText
    Debug.Print oReq.getAllResponseHeaders
    Debug.Print oReq.responseText
End With
End Function

   'http.setRequestHeader "Cookie", "JIFTY_SID_HIVEMINDER=$COOKIE"
' may need to duplicate to get around bug
'    .setRequestHeader "Content-Type", "application/x-www-form-
urlencoded"
'    .setRequestHeader "Content-Type", "multipart/form-data"
'    uMsg = uMsg & "&J:A:F:F-remember-
auto-69933bbaccf747a70b9ac88281ba64bd-1=0"
'    uMsg = uMsg & "&remember=1"
'    uMsg = uMsg & "&token="

I would appreciate any help.  I a new REST user and am not that
familiar with HTTP and surrounding protocols.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jesse Vincent  
View profile  
 More options Jan 19 2009, 9:36 am
From: Jesse Vincent <je...@bestpractical.com>
Date: Mon, 19 Jan 2009 09:36:28 -0500
Local: Mon, Jan 19 2009 9:36 am
Subject: Re: Question about IE vs. Firefox API support using Excel VBA

On Fri, Jan 16, 2009 at 12:05:08PM -0800, dhfan2 wrote:

> I'm trying to use the winhttp COM component from Excel to login into
> hiveminder.com, but haven't succeeded yet.

> Before trying to debug why I can't login, I've noticed a discrepancy.
> Firefox returns a simpler HTML page and IE seems to redirect when I
> just manually enter "http://hiveminder.com/=/action/BTDT.Action.Login"
> into each browser.  I'm using the latest browsers on MS Vista Business
> 32.

Hm. Can you use a tool like wireshark to see what each browser is
seeing/doing?

> I'm trying to automate the retrieval and posting of tasks using the HM
> API.  So far, this is what I have in my VBA module:

Sadly, I know nothing of VBA

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »