Can Matlab capture a Server responses sent to HTML5 client?
3 次查看(过去 30 天)
显示 更早的评论
Is it possible to use Matlab to intercept a server responses sent to HTML5?
In python, it's done via:
import urllib.request
requestbody = ('{"Instrument":0}')
req = urllib.request.Request(
url='https:blahblahblah',
data=requestbody.encode('utf-8'),
headers={
'content-type': 'application/json',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.35 (KHTML, like Gecko) Chrome/68.0.3440.105 Safari/537.35',
'cookie': cookie
} )
response = urllib.request.urlopen(req).read().decode('utf-8')
I'd rather not have to install Python and use Matlab (java). Is Matlab capable of retrieving the server responses? If so, can you please tell me how or point me in the right direction?
Thank you in advance for reading and any possible help!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!