Can Matlab capture a Server responses sent to HTML5 client?

1 vue (au cours des 30 derniers jours)
Daulton_Benesuave
Daulton_Benesuave le 17 Sep 2018
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!

Réponses (0)

Produits


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by