wbart
May 21, 2020, 3:57pm
1
Hello,
I want to do a get request to the ctd database. The platform communicates the following url:
Parameters:
URL: http://ctdbase.org/detail.go?type=chem&acc={ID}
Parameters:
{ID} - the MeSH® Unique ID of the chemical (e.g., “D001151”). Download the CTD chemical vocabulary.
I put the following parameter in the URL section for the get request node:
http://ctdbase.org/detail.go?type=chem&acc={“D001151”}
and get the following error:
ERROR GET Request 3:1 Execute failed: java.lang.IllegalArgumentException: Illegal character in query at index 43: http://ctdbase.org/detail.go?type=chem&acc= {“D001151”}
What is wrong?
Best regards
Werner
Hello @wbart ,
This one works:
http://ctdbase.org/detail.go?type=chem&acc=D001151
I mean it executes. Haven’t verified content. I simply removed what was on at index 43
Br,
Ivan
wbart
May 21, 2020, 4:16pm
3
Hello Ivan,
what does index 43 refer to?
If you give every character in
http://ctdbase.org/detail.go?type=chem&acc={“D001151”}
a number going from left to right, starting from 0 and incrementing by 1, those are the indices. You can think of it as a position number of a character in the string.
The first character has an index of 0. Index 43 is the curly brace “{”.
1 Like
wbart
May 22, 2020, 6:15am
5
If i delete the position in the term it won`t work at all. it doesn’t make sense in my opinion too. It is very strange.
wbart
May 22, 2020, 6:22am
6
now it works. I had to completely skip the {} brackets. Thank you
Hi @wbart ,
sry for not elaborating more but you figured it out.
Check here how to encode curly brackets in URL and why
Br,
Ivan
system
Closed
November 21, 2020, 1:23am
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.