Alpana Shukla
03/17/2022, 1:07 PMpublic override bool CheckConnection(AirbyteLogger logger, JsonElement config, out Exception exc)
{
_Key = config.GetProperty("Key").GetString();
_UID = config.GetProperty("UID").GetString();
exc = null;
try
{
//return UrlBase.AppendPathSegment($"sensorspot").SetQueryParam("uid",_UID).SetQueryParam("key",_Key).GetAsync()
// .Result.GetJsonAsync().Result.success;
//return UrlBase.AppendPathSegment("sensorspot")
//.GetAsync()
//.Result.GetJsonAsync().Result.success;
return
UrlBase.AppendPathSegment($"sensorspot").SetQueryParams(new { uid = _UID, key = _Key }).GetAsync()
.Result.GetJsonAsync().Result.success;
}
catch (Exception e)
{
exc = e;
}
return false;
}
Hi I am trying to develop a connector to call an API with parameters with this as code, when I try to create a source it gives "'System.Dynamic.ExpandoObject' does not contain a definition for 'success'" error. If I write UrlBase.AppendPathSegment($"sensorspot?uid=_UID, key = _Key ").GetAsync().Result.GetJsonAsync().Result.success;
then it returns <https://api.abcsfag.com/sensorspot>*%3F*uid=8C289812CFA4&key=RJUL)
as URL replacing ? as %3F .Attaching logs for reference. Any help would be highly appreciated. 🙂Octavia Squidington III
03/17/2022, 2:05 PMMarcos Marx (Airbyte)
03/18/2022, 1:16 AMAlpana Shukla
03/18/2022, 9:02 AM