convert API query from Python to MATLAB -
i thought should straightforward struggled convert following api query python matlab
import json import requests url='http://amp.pharm.mssm.edu/enrichr/addlist' gstr='\n'.join([ 'phf14','rbm3','msl1','phf21a','arl10']) payload={'list':(none, gstr)} response=requests.post(url, files=payload)
here tried on matlab
gstr = 'phf14\nrbm3\nmsl1\nphf21a\narl10' input = struct('list', gstr); response = webwrite(url, input)
edit: following error on matlab
the server returned message: "bad request" url (with http response code 400)
i on matlab r2015b.
matlab doesn´t natively support writing files webservice. used mathworks function so, solved problem.
Comments
Post a Comment