Query with content-type : application/json returns 400 status code
Opened this issue · 1 comments
lpalbou commented
Sending this query:
curl 'http://api.geneontology.org/api/ontology/ribbon/?subset=goslim_agr&subject=ZFIN:ZDB-GENE-980526-166&subject=HGNC:10848&subject=MGI:98297&subject=RGD:3673&subject=FB:FBgn0004644&subject=WB:WBGene00001700&subject=WB:WBGene00001691&subject=WB:WBGene00004264&subject=WB:WBGene00006952&exclude_PB=true&exclude_IBA=true' -H 'Content-Type: application/json' -I
Will return a 400 due to the content-type
kshefchek commented
What is the use case for passing 'application/json' for url encoded parameters? The content type header should be application/x-www-form-urlencoded.
I suspect if you set up a POST request in the api code and passed JSON data this would all work, eg
curl -X POST "https://api.geneontology.org/api/some/function" -H "accept: application/json" -H "Content-Type: application/json" -d "{ some json }"