Get Resource failing on some valid URLs

Hi,

I am trying to use a batch Get Resource node to pull data from a REST server. I have a list of smiles strings, and I want to get a data return from each string. Some of them work but other give the following error message:

ERROR GET Resource         0:27       Execute failed: Invalid URL: http://services/bci/services/structures/similar?smiles=CO[C@@H]1C[C@H](C)CC2=C(NCC=C)C(=O)C=C(NC(=O)\C(C)=C\C=C\[C@H](OC)[C@H](OC(N)=O)\C(C)=C\[C@H](C)[C@@H]1O)C2=O&searchType=duplicate&threshold=0.9

The same URL works fine when used manually in chrome. The following URL works fine in the GET Resource node:

http://services/bci/services/structures/similar?smiles=COc1ccc(C(=O)NC2C[C@H]3CC[C@H](C2)N3c2ccc(cn2)C(=O)NCCN(C)C)c(C)c1&searchType=duplicate&threshold=0.9

Does anyone know why this might be happenning? 

Thanks,

Ben Allen

 

 

 

Hi Ben,

I suppose the backslashes "\" in your first smiles string could be the problem. Try using a String Replacer node to substitute them with "%5C", which is the escaped version of the backslash "\" in a URL parameter.

Chrome may recognize the that backslashes are part of a URL parameter and replace them behind the scenes.

Your second string doesn't have any backslash and this may be the reason it works properly.

Try it out and see if it solved the issue.

Cheers,
Marco.

 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.