I need to send a request to a server and get a response.

I have the following URL:

<http://192.168.200.10:9044/api/tables/?filter=>{"open\_visible":true,"related":false}

For the query I'm using Alamofire. Here are some ways how I do it:

1) 

```
class func getTables(completion: @escaping (_ response : DataResponse<TablesResponse>) -> Void) {
    SVProgressHUD.show()
    let getTablesPath = apiEntryPoint + "tables/?filter={\"open_visible\":true,\"related\":false}"

    Alamofire.request(getTablesPath)
        .validate()
        .responseObject { (response: DataResponse<TablesResponse>) in
            SVProgressHUD.dismiss()
            completion(response)
    }
}

```

I get the error: [screenshot](https://i.stack.imgur.com/uAEUh.png)

2) 

```
class func getTables(completion: @escaping (_ response : DataResponse<TablesResponse>) -> Void) {
    SVProgressHUD.show()
    let getTablesPath = apiEntryPoint + "tables/?filter={%22open_visible%22:true,%22related%22:false}"

    Alamofire.request(getTablesPath)
        .validate()
        .responseObject { (response: DataResponse<TablesResponse>) in
            SVProgressHUD.dismiss()
            completion(response)
    }
}

```

I get the error.

3) 

```
class func getTables(completion: @escaping (_ response : DataResponse<TablesResponse>) -> Void) {
    SVProgressHUD.show()
    var getTablesPath = apiEntryPoint + "tables/?filter="

    let jsonParameters = ["open_visible":true, "related":false]
    if let json = try? JSONSerialization.data(withJSONObject: jsonParameters, options: []) {
        if let content = String(data: json, encoding: .utf8) {
            getTablesPath += content
        }
    }

    Alamofire.request(getTablesPath)
        .validate()
        .responseObject { (response: DataResponse<TablesResponse>) in
            SVProgressHUD.dismiss()
            completion(response)
    }
}

```

I get the error.

4)

```
class func getTables(completion: @escaping (_ response : DataResponse<TablesResponse>) -> Void) {
    SVProgressHUD.show()
    let getTablesPath = apiEntryPoint + "tables/"

    Alamofire.request(getTablesPath, parameters: ["open_visible":true, "related":false])
        .validate()
        .responseObject { (response: DataResponse<TablesResponse>) in
            SVProgressHUD.dismiss()
            completion(response)
    }
}

```

I got all tables. Without taking into account the desired parameters. It's bad.

**QUESTION**

As I can send a request for the server, considering the necessary parameters.