フィルターのクリア

Can Matlab capture a Server responses sent to HTML5 client?

1 回表示 (過去 30 日間)
Daulton_Benesuave
Daulton_Benesuave 2018 年 9 月 17 日
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 件)

カテゴリ

Help Center および File ExchangePython Client Programming についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by