+NpGX\\\"Rt5$\",true)))\n\n-- Sample result:\n-- {true,\"maintenance succeeded\"}\n"},"swift-nsurlsession":{"filename":"invoke-using-swift-nsurlsession.swift","data":"// \r// Sample for system management object / apply maintenance code.\r// \r// This is a sample demonstrating how to apply maintenance code.\r// \r\r// Note that this sample has been generated by httpsnippet;\r// authentication configuration (usually digest) is not included.\r\rimport Foundation\r\rlet headers = [\r \"Connection\": \"close\",\r \"Content-Type\": \"application/json\",\r \"Accept\": \"application/json\",\r \"X-CSRF\": \"x\"\r]\rlet parameters = [\"Nx{t++u$2c/,fsR/0]Hk7(\\I+/\", false] as [String : Any]\r\rlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\r\rlet request = NSMutableURLRequest(url: NSURL(string: \"http://192.168.0.100/restapi/system/apply_maintenance_code/\")! as URL,\r cachePolicy: .useProtocolCachePolicy,\r timeoutInterval: 10.0)\rrequest.httpMethod = \"POST\"\rrequest.allHTTPHeaderFields = headers\rrequest.httpBody = postData as Data\r\rlet session = URLSession.shared\rlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\r if (error != nil) {\r print(error)\r } else {\r let httpResponse = response as? HTTPURLResponse\r print(httpResponse)\r }\r})\r\rdataTask.resume()\r\r\r// Sample result:\r// [false,\"maintenance failed\"]\r"}}};