Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] JAVA IOException code 414 URL too long, with get call

Darren Weber dlweber at stanford.edu
Wed Feb 26 11:28:05 PST 2014


Hi Mona,

You may have to change from GET to POST.  There are limits imposed by 
browsers and servers on the length of GET requests.  Search discussions 
on this topic, e.g.

http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers

Hope that helps,
Darren


On 2/26/14, 10:42 AM, Mona Salem wrote:
> Hi All
> I have used the AnnotateText.java from github repository.  I have changed it
> a bit, so to pass parameters generated in another class of my code.
> (I am calling the AnnotateText.stringToAnnotate method from my code.  I am
> passing the String abstractinfo.)
>
> public class AnnotateText {
>
>      static final String REST_URL = "http://data.bioontology.org";
>      static final String API_KEY = "";
>      static final ObjectMapper mapper = new ObjectMapper();
> 	
>
>      public static void stringToAnnotate(String abstractinfo) throws
> Exception {
>          String textToAnnotate = URLEncoder.encode(abstractinfo "UTF-8");
>
>          // Get just annotations only
>          JsonNode annotations = jsonToNode(get(REST_URL +
> "/annotator?ontologies=NCIT&text=" + textToAnnotate));
>          
>
>
>
> After reading the get,
>          JsonNode annotations = jsonToNode(get(REST_URL +
> "/annotator?ontologies=NCIT&text=" + textToAnnotate));
>
> I get the 414 URL too long error.
> How long can text be when I read with get; ie what is the max length?  Are
> you changing this portion of code to POST instead?
>
> Thanks for any help on this
> Mona Nafoosi
> G6G Consulting Group
> Santa Monica CA
>          
>
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support



More information about the bioontology-support mailing list