Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a link with '&'?

Владимир Бобров November 20, 2019

Dear community,

I setup the integration via API with enterprise ERP system. We need a link to initial document in our ERP-system in the Trello card. The link has a template like this: https://server.com/prod-web/?page=90375&company=company&dc=0

As you see, the link contains '&'. When I send the link via REST-API, only the part https://server.com/prod-web/?page=90375 is saved in the card. The rest is handled as method parameter. 

Is there a way to send the parameters as a JSON?
Or is there any syntaxis to show that the full link is just one parameter?

Kind regards,
Vladimir

2 answers

2 accepted

0 votes
Answer accepted
Iain Dooley
Community Champion
November 20, 2019

@Владимир Бобров you just need to use encodeURIComponent on the values when you send them

Владимир Бобров November 20, 2019

Nice try. The problem here is that encodeURIComponent is a JavaScript method. I'm programming from the inside of the ERP-system, which has specific language and specific stackes on board. I could use something from dotnet for example. But the JavaScript I don't know how to apply.🤷

0 votes
Answer accepted
Outright Systems Pvt. Ltd. November 20, 2019

I think you need to use PUT method , are you using POST?

Владимир Бобров November 20, 2019

I use post and this works fine for me. The problem is only with '&' symbol

Outright Systems Pvt. Ltd. November 20, 2019

Ok,

all data needs to send URL-Encoded format. 

in PHP we use urlencode function, what language you are at?

Владимир Бобров November 20, 2019

I'm programming from the inside of the ERP-system, which has specific language and specific stackes on board. I could use something from dotnet for example. 

Outright Systems Pvt. Ltd. November 20, 2019

https://www.w3schools.com/tags/ref_urlencode.asp

 

I think this is what  you need exactly..

Владимир Бобров November 20, 2019

yes, got it =) Thanks =)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events