【发布时间】:2015-12-17 11:36:53
【问题描述】:
我正在使用 Curl 发出以下 HTTP GET 请求:
卷曲http://rest.ensembl.org/variation/human/rs56116432?content-type=application
它返回以下 JSON 对象:
{"source":"Variants (including SNPs and indels) imported from dbSNP","mappings":[{"location":"9:133256042-133256042","assembly_name":"GRCh38","end":133256042,"seq_region_name":"9","strand":1,"coord_system":"chromosome","allele_string":"C/T","start":133256042},{"location":"CHR_HG2030_PATCH:133256189-133256189","assembly_name":"GRCh38","end":133256189,"seq_region_name":"CHR_HG2030_PATCH","strand":-1,"coord_system":"chromosome","allele_string":"C/T","start":133256189}],"name":"rs56116432","MAF":"0.00259585","ambiguity":"Y","var_class":"SNP","synonyms":[],"evidence":["Multiple_observations","Frequency","1000Genomes","ESP","ExAC"],"ancestral_allele":"C","minor_allele":"T","most_severe_consequence":"missense_variant"
是否可以构造HTTP请求,只返回键"most_severe_consequence"的值给浏览器,而不是在请求返回后过滤数据?
API documentation 不包含具体示例。
【问题讨论】: