/// <summary> /// Returns the value of the tag as a string /// </summary> /// <param name="objectID"></param> /// <returns></returns> public string GetValue(FluidDBGUID objectID) { // send get request with parameters in URI (.net does not allow you to use the payload HttpWebResponse r = Connection.Call(METHOD.GET, "/objects/" + objectID.ID + "/" + Name, null, FluidConnector.PrimitivePutType, ""); if (r.StatusCode == HttpStatusCode.OK) { string value = Connection.GetRawResult(r); // remove quotes return value.Remove(0,1).Remove(value.Length - 2,1); } else { return null; } }
/// <summary> /// Returns the tag value as a string, must use this method if value is stored with a custom content type /// </summary> /// <param name="objectID"></param> /// <param name="contentType"></param> /// <returns></returns> public string GetValue(FluidDBGUID objectID, string contentType) { // send get request with parameters in URI (.net does not allow you to use the payload HttpWebResponse r = Connection.Call(METHOD.GET, "/objects/" + objectID.ID + "/" + Name, null, contentType, ""); if (r.StatusCode == HttpStatusCode.OK) { string value = Connection.GetRawResult(r); return value; } else { return null; } }