Closed roseypro closed 3 years ago
I think the updates should have solved this issue and you can now log out - it worked for me when I was testing it.
Thanks for your work on the update to httr. I'm actually getting a different message with the new update. When running logoutBF() I get: No encoding supplied: defaulting to UFT-8
and then the function just returns the colon ":" is this something you have seen? As far as I can tell it is actually logging out, just not returning any confirmation/error string.
In general, to fix the No encoding supplied: defaulting to UTF-8
warning we need to add encoding = "UTF-8" to
httr::content`
However, the Betfair API logout endpoint is different to most of the other API calls, and just returns a character string. The current httr
code isn't dealing with this character string very well and needs to be updated to read the success or error messages.
I'll try to look into that in the next days.
Or we could revert to RCurl!
haha
I have changed the as = "text"
in the httr:content()
call, to as = "parsed"
and am getting the "SUCCESS:" message for the logout function. Seems to have worked - it also gives the "FAIL:NO_SESSION" when using it and not logged in, as we would expect.
How about that...... I just updated the whole function with 44eef6320002236df4469f99998e7dcb60132d
Both approaches seem to work. Maybe yours is more elegant as it changes less code.
@roseypro Went with your solution instead. Committed in efd7df4e646106b57e006497cc4eb00ab260c418
Hi Phill When trying to use logoutBF(), I get this message returned:
Error in function (type, msg, asError = TRUE) : error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Am able login successfully. Error message is returned when sslVerify is set to F or T.
Thanks Chris