Question: I am trying to api test few APIs using Robot framework.
when I try to test api with square brackets it is not getting considered and getting wrong response. Whereas the same api is able to give correct response in POSTMAN.

I have the below API:
<https://orbit.com/s2e/api/q1/client/?filter[customField.ID]=1003>

When I hit in Postman I am getting valid response as 

```
 "data": {
    "total_count": "1",
    "customer": [
        {
            "id": "123" } ] }

```

The same API 
<https://orbit.com/s2e/api/q1/client/?filter[customField.ID]=1003> hit in Robot framework gives 

```
"data": {
    "total_count": "0",
    "customer": [] }

```

Then I saw various encoding and found to use %5B and %5D instead of [ and ] but that API is working properly in postman but in robotframework, it is giving all data i.e filter not working.

<https://orbit.com/s2e/api/q1/client/?filter%5BcustomField.ID%5D=1003>
Can anyone guide me here?

Answer: 
Try to encode URL Path by create custom Library for Robotframework.

**For Python V2**

```
import urllib   
def encodeUrlPath(s): 
   return urllib.quote_plus(s)

```

**For Python V3** 

```
import urllib.parse
def encodeUrlPath(s): 
  return urllib.parse.quote_plus(s)

```
Maybe the problem is not with the square brackets but with the equal sign.
It is difficult to know what problem you are facing as you don't share your Robot Code.

But here are two implementation of basic GETS performed on URL that contain square brackets. Note that I used a backslash (`\`) before the `=` otherwise it is considered as a named argument.

Implementation with [`requests` library](https://requests.readthedocs.io/en/master/):

```
*** Settings ***
Library  requests

*** Test Case ***
mytest
    ${response} =  requests.get  https://postman-echo.com/get?foo1\=[bar1]&foo2\=bar2
    Log To Console  ${response.json()}

```

Implementation with [`RequestsLibrary` library](https://github.com/bulkan/robotframework-requests):

```
*** Settings ***
Library  RequestsLibrary

*** Test Case ***
mytest
    Create Session  postman_echo  https://postman-echo.com
    ${response} =  Get Request  postman_echo  /get?foo1\=[bar1]&foo2\=bar2  
    Log To Console  ${response.json()}  

```