コード例 #1
0
        public VisibleRequest(object request, string resource, VisibleConfig visibleConfiguration, Method method = Method.POST)
        {
            visibleClient = new Client(visibleConfiguration);

            restRequest = new RestRequest(resource, method);
            restRequest.AddHeader("Accept", "application/json");
            restRequest.AddHeader("content_type", "application/json");
            restRequest.AddJsonBody(request);
        }
コード例 #2
0
        internal Client(VisibleConfig visibleConfiguration)
        {
            ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

            if (visibleConfiguration == null)
            {
                throw new ArgumentNullException("visibleConfiguration");
            }
            configuration = visibleConfiguration;

            client = new RestClient(visibleConfiguration.ApiURL);

            Assembly        assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo info     = FileVersionInfo.GetVersionInfo(assembly.Location);

            version = info.FileVersion;
        }