survos / platform-api-r

Sample programs demonstrating calls to the API
0 stars 0 forks source link

Update Login Function to httr and with better messaging #7

Closed phillc73 closed 8 years ago

phillc73 commented 8 years ago
  1. Remove RCurl dependency on login and change POST to httr library, consistent with the other function packages.
  2. Add better login failure messaging.
  3. Account for potential missing trailing slash on user entered endpoint
phillc73 commented 8 years ago
  1. Complete. Login now uses httr library instead of RCurl
  2. Complete. A failed login now prints the following message:
Error in loginSurvos(username, password) : 
  HTTP failure: 401 Invalid credentials
Oops, something went wrong.
401 Invalid Credentials: Please check the entered username and password.
404 No route found: Please check the entered endpoint URL.
  1. Complete. Endpoint URLs without trailing slashes now have trailing slashes added.