``` public override bool CheckConnection(AirbyteLo...
# connector-development
a
Copy code
public 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. 🙂
o
loading...
m
What CDK are you using? For non-official one I recommend to open issues in Github to get support