Hello All,
Has anything changed in the API in the last couple of weeks - just
noticed a timesheet app that I use is no longer pulling in new
projects. The “freeagentcentral.com/projects?view=all” control is no
longer performing basic HTTPS authentication.
This used to work fine, but now instead of displaying the 400 code
required for basic auth, it is displaying an HTML Freeagent login
screen.
Hey, as the API group is getting more active, thought I would post in
case anybody else was seeing the same thing.
For reference, my code is as follows:
Dim URL As String
URL = "https://" & compcode & ".freeagentcentral.com/
projects?view=all"
Dim request As WebRequest = WebRequest.Create(URL)
request.Credentials = New NetworkCredential(ucode, pword)
request.ContentType = “application/xml”
' Get the response.
Try
Dim response As HttpWebResponse =
CType(request.GetResponse(), HttpWebResponse)
Dim dataStream As Stream =
response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
’ Cleanup the streams and the response.
reader.Close()
dataStream.Close()
response.Close()
Dim xmlstring As New XmlDocument
xmlstring.LoadXml(responseFromServer)
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
'Get the list of name nodes
m_nodelist = xmlstring.SelectNodes("/projects/
project")
Its erroring out - the “responseFromServer” is the HTML freeagent
login code.