File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ public ANetApiResponse Send(ANetApiRequest apiRequest) {
54
54
//Authenticate it
55
55
AuthenticateRequest ( apiRequest ) ;
56
56
57
+ // Set Tls to Tls1.2
58
+ ServicePointManager . SecurityProtocol = SecurityProtocolType . Tls12 | SecurityProtocolType . Tls11 | SecurityProtocolType . Tls ;
59
+
57
60
HttpWebRequest webRequest = ( HttpWebRequest ) WebRequest . Create ( _serviceUrl ) ;
58
61
webRequest . Method = "POST" ;
59
62
webRequest . ContentType = "text/xml" ;
@@ -74,9 +77,6 @@ public ANetApiResponse Send(ANetApiRequest apiRequest) {
74
77
serializer . Serialize ( writer , apiRequest ) ;
75
78
writer . Close ( ) ;
76
79
77
- // Set Tls to Tls1.2
78
- ServicePointManager . SecurityProtocol = SecurityProtocolType . Tls12 | SecurityProtocolType . Tls11 | SecurityProtocolType . Tls ;
79
-
80
80
// Get the response
81
81
WebResponse webResponse = webRequest . GetResponse ( ) ;
82
82
You can’t perform that action at this time.
0 commit comments