https://linen.dev logo
#connector-development
Title
# connector-development
a

Alpana Shukla

03/17/2022, 1:07 PM
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

Octavia Squidington III

03/17/2022, 2:05 PM
loading...
m

Marcos Marx (Airbyte)

03/18/2022, 1:16 AM
What CDK are you using? For non-official one I recommend to open issues in Github to get support
6 Views