# Issue while sending Delete On Session request

**URL:** https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392
**Category:** Robot Framework
**Created:** [7 September 2021 17:54 UTC](https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392 "2021-09-07T17:54:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Anup](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Anup](https://forum.robotframework.org/u/Anup)
#### Post date: [7 September 2021 17:54 UTC](https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392/1 "2021-09-07T17:54:13Z")

</div>

I am trying to send one Delete request. In the url i am passing a parameter as a dictionary but in the log the curly brackets of dictionary converting into %7B and double quotes converting into %20.  
for ex.  
${x}= {‘countryId’: ‘64’, ‘from’: 22330581, ‘to’: 22330586}

${req3}= catenate SEPARATOR= /a/b/c? token=${token} &number-range-list=${x}&customer-service-id=abc

${response}= Delete On Session mysession ${req3} headers=${header}

log ${response}

it gives response in logfile as -  
DELETE Response : url=https://10.111.14.133:83767/a/b/c?token=NzE1NDlkNTMwOWUxMWVlY2M4MjM4YTgyYzU=&number-range-list=%7B’countryId’:%20’64’,%20’from’:%2022330581,%20’to’:%2022330586%7D&customer-service-id=abc

so as we can see {‘countryId’: ‘64’, ‘from’: 22330581, ‘to’: 22330586} is converting to %7B’countryId’:%20’64’,%20’from’:%2022330581,%20’to’:%2022330586%7D

so how to deal with this condition. Any suggestions is appreciated . Thanks in advance

---

<div class="post-metadata">

### Author: ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)
#### Post date: [7 September 2021 23:51 UTC](https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392/2 "2021-09-07T23:51:30Z")

</div>

Hi Anup,

Because you put the variable ${x} into the URL it’s been urlencoded, the %20 is not a double quote (that would be %22) but a space.

if you don’t want the url encoding, perhaps removing the spaces would be enough to stop that happening automatically:

from this:

```python
${x}= {‘countryId’: ‘64’, ‘from’: 22330581, ‘to’: 22330586}

```

to this

```python
${x}= {‘countryId’:‘64’,‘from’:22330581,‘to’:22330586}

```

It shouldn’t be an issue though the web server should know how to url decode the value.

Hope this helps

Dave.

---

<div class="post-metadata">

### Author: ![Anup](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Anup](https://forum.robotframework.org/u/Anup)
#### Post date: [8 September 2021 02:30 UTC](https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392/3 "2021-09-08T02:30:56Z")

</div>

Hi Dave,  
Thanks for your response.  
I removed the space and now %20 is not appearing but the curly brackets is encoded to %7B. But i dont want %7B in my request URL, i want curly brackets in my url.

thanks,  
Anup

---

<div class="post-metadata">

### Author: ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)
#### Post date: [8 September 2021 14:54 UTC](https://forum.robotframework.org/t/issue-while-sending-delete-on-session-request/2392/4 "2021-09-08T14:54:20Z")

</div>

Hi Anup,

I replicated the issue with this little test case I created:

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

***Variables***
${x}= {'countryId':'64','from':22330581,'to':22330586}
${token}=	NzE1NDlkNTMwOWUxMWVlY2M4MjM4YTgyYzU

***Test Cases***
Anup
	Create Session mysession http://www.google.com

	Log ${x}
	${req3}= catenate SEPARATOR= /a/b/c? token=${token} &number-range-list=${x}&customer-service-id=abc
	Log ${req3}
	# ${req3}= Set Variable /a/b/c?token=${token}&number-range-list=${x}&customer-service-id=abc
	Log ${req3}
	${response}= Get On Session mysession ${req3}
	log ${response}

```

Unfortunately I don’t know what the solution is, but I can confirm it’s the “xxx On Session” (e.g. Delete On Session / Get On Session) call that’s doing the url encoding. I just couldn’t find anywhere in the documentation that shows how to stop this.

Maybe there is a ReqiestsLibibrary expert out there thta knows what to do?

Dave.
