addConnectionWithHttpInfo method
Future<Response>
addConnectionWithHttpInfo(
- AddConnectionRequest addConnectionRequest, {
- required String uuidToken,
Creates a new connection
Creates a new connection and returns the associated id. Requires either AddConnectionS7 or AddConnectionModbus or AddConnectionOPCUA object as request body. The connection could be potentially deleted after a certain timeout of inactivity. When an Internal Server Error occours, an Error object will be returned.
Note: This method returns the HTTP Response.
Parameters:
-
AddConnectionRequest addConnectionRequest (required):
-
String uuidToken: Used for remote connections to device
Implementation
Future<Response> addConnectionWithHttpInfo(
AddConnectionRequest addConnectionRequest, {
required String uuidToken,
}) async {
// ignore: prefer_const_declarations
final path = '${LbWriterEnvironment.getApiEndpoint(
iotUuid: uuidToken,
)}/connection/';
// ignore: prefer_final_locals
Object? postBody = addConnectionRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}