private string RESTGetUserProfile(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { UUID id; UserProfileData userProfile; try { id = new UUID(param); } catch (Exception) { httpResponse.StatusCode = 500; return("Malformed Param [" + param + "]"); } userProfile = m_userDataBaseService.GetUserProfile(id); if (userProfile == null) { httpResponse.StatusCode = 404; return("Not Found."); } return(ProfileToXmlRPCResponse(userProfile).ToString()); }
private string RESTGetUserProfile(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { // Check IP Endpoint Access if (!TrustManager.Instance.IsTrustedPeer(httpRequest.RemoteIPEndPoint)) { httpResponse.StatusCode = 403; return("Access is denied for this IP Endpoint"); } UUID id; UserProfileData userProfile; try { id = new UUID(param); } catch (Exception) { httpResponse.StatusCode = 500; return("Malformed Param [" + param + "]"); } userProfile = m_userDataBaseService.GetUserProfile(id); if (userProfile == null) { httpResponse.StatusCode = 404; return("Not Found."); } return(ProfileToXmlRPCResponse(userProfile).ToString()); }