[OTDev] curl urls
Nina Jeliazkova nina at acad.bgWed Feb 3 13:58:02 CET 2010
- Previous message: [OTDev] curl urls
- Next message: [OTDev] URI Lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tobias Girschick wrote: > Hello All, > > I have a question regarding the curl statements. Our API 1.1 > (http://opentox.org/dev/apis/api-1.1) states that "Parameters are posted > with a "Content-Type:application/x-www-form-urlencoded" HTTP header." > > I see two ways using curl here: The first one is described on the API > page: > curl -X GET > http://{server}/dataset?compound_uris[]={compound_uri1}&compound_uris[]={compound_uri2}) > > The second one is (according to > http://curl.haxx.se/docs/manpage.html#-d--data) to attach the parameters > with -d to the curl call. > > The first version however seems not to be working with our > implementation. Can you tell me if the way the URL is constructed is > wrong? > curl -X POST > http://localhost:8180/OpenTox/algorithm/kNNregression?dataset_uri=http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/23&prediction_feature=http://ambit.uni-plovdiv.bg:8080/ambit2/feature/12818 > > IMHO, if it is a POST call , the parameters should be attached with -d , otherwise in your last example , parameters will be passed as a query string, not within the content. If you are then parsing the content with Form = new Form(entity) , the entity will be empty - is this what happens? Best regards, Nina > best regards, > Tobias > > > > > > > >
- Previous message: [OTDev] curl urls
- Next message: [OTDev] URI Lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Development mailing list