Main Content

La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.

Utiliser HTTP avec MATLAB

Communiquer avec des services web via HTTP (Hypertext Transfer Protocol)

Les fonctions MATLAB® de services web RESTful webread, websave, webwrite et la fonction de support weboptions permettent aux utilisateurs sans compétences en programmation d’accéder à de nombreux services web avec les méthodes HTTP GET et POST. Pour plus d’informations sur ces fonctions, consultez Services web.

Toutefois, certaines interactions avec les services web sont plus complexes et nécessitent des fonctionnalités que les fonctions de services web RESTful ne supportent pas. L’interface HTTP de MATLAB propose des classes permettant d’écrire des applications d’accès web. Elle comprend des classes pour les messages, leurs en-têtes et leurs champs ainsi que les autres entités définies par les normes de l'IETF® (The Internet Engineering Task Force). Elle contient des fonctions qui implémentent la sémantique de messagerie HTTP ainsi que des utilitaires pour traiter les données envoyées et reçues. Elle contient également les classes de support requises pour traiter, émettre et recevoir des messages.

Classes

développer tout

matlab.net.http.RequestMessageHTTP request message
matlab.net.http.ResponseMessageHTTP response message
matlab.net.http.MessageHTTP request or response message
matlab.net.http.MessageTypeHTTP message type
matlab.net.http.MessageBodyBody of HTTP message
matlab.net.http.ProtocolVersionHTTP protocol version
matlab.net.http.RequestLineFirst line of HTTP request message
matlab.net.http.RequestMethodHTTP request method
matlab.net.http.StartLineFirst line of HTTP message
matlab.net.http.StatusClassStatus class of HTTP response
matlab.net.http.StatusCodeStatus code in HTTP response
matlab.net.http.StatusLineFirst line of HTTP response message
matlab.net.http.HeaderFieldHeader field of HTTP message
matlab.net.http.field.AcceptFieldHTTP Accept header field
matlab.net.http.field.AuthenticateFieldHTTP WWW-Authenticate or Proxy-Authenticate header field
matlab.net.http.field.AuthenticationInfoFieldHTTP Authentication-Info header field in response message
matlab.net.http.field.AuthorizationFieldHTTP Authorization or Proxy-Authorization header field
matlab.net.http.field.ContentDispositionFieldHTTP Content-Disposition header field
matlab.net.http.field.ContentLengthFieldHTTP Content-Length field
matlab.net.http.field.ContentLocationFieldHTTP Content-Location header field
matlab.net.http.field.ContentTypeFieldHTTP Content-Type header field
matlab.net.http.field.CookieFieldHTTP Cookie header field
matlab.net.http.field.DateFieldHTTP Date header field
matlab.net.http.field.GenericFieldHTTP header field with any name and value
matlab.net.http.field.GenericParameterizedFieldGenericField to support parameterized syntax
matlab.net.http.field.HTTPDateFieldHTTP header field containing date
matlab.net.http.field.IntegerFieldBase class for HTTP header fields containing nonnegative integers
matlab.net.http.field.LocationFieldHTTP Location header field
matlab.net.http.field.MediaRangeFieldBase class for HTTP Content-Type and Accept header fields
matlab.net.http.field.SetCookieFieldHTTP Set-Cookie header field
matlab.net.http.field.URIReferenceFieldBase class for HTTP header fields containing URI components
matlab.net.http.io.ContentConsumerConsumer for HTTP message payloads
matlab.net.http.io.FileConsumerConsumer for files in HTTP messages
matlab.net.http.io.StringConsumerString consumer for HTTP payloads
matlab.net.http.io.JSONConsumerContent consumer that converts JSON input into MATLAB data
matlab.net.http.io.ImageConsumerConsumer for image data in HTTP payloads
matlab.net.http.io.MultipartConsumerHelper for multipart content types in HTTP messages
matlab.net.http.io.BinaryConsumerConsumer for binary data in HTTP messages
matlab.net.http.io.GenericConsumerConsumer for multiple content types in HTTP messages
matlab.net.http.io.ContentProviderContentProvider for HTTP message payloads
matlab.net.http.io.FileProviderContentProvider to send files
matlab.net.http.io.FormProviderContentProvider that sends form data
matlab.net.http.io.MultipartFormProviderContentProvider to send multipart/form-data messages
matlab.net.http.io.StringProviderContentProvider to send MATLAB strings
matlab.net.http.io.JSONProviderContentProvider to send MATLAB data as JSON string
matlab.net.http.io.ImageProviderContentProvider to send MATLAB image data
matlab.net.http.io.MultipartProviderContentProvider to send multipart/mixed HTTP messages
matlab.net.http.io.GenericProviderGeneric ContentProvider for HTTP payloads
matlab.net.http.AuthenticationSchemeHTTP Authentication scheme
matlab.net.http.AuthInfoAuthentication or authorization information in HTTP messages
matlab.net.http.CookieHTTP cookie received from server
matlab.net.http.CookieInfoHTTP cookie information
matlab.net.http.CredentialsCredentials for authenticating HTTP requests
matlab.net.http.DispositionResults in HTTP log record
matlab.net.http.HTTPExceptionException thrown by HTTP services
matlab.net.http.HTTPOptionsOptions controlling HTTP message exchange
matlab.net.http.LogRecordHTTP history log record
matlab.net.http.MediaTypeInternet media type used in HTTP headers
matlab.net.http.ProgressMonitorProgress monitor for HTTP message exchange
matlab.net.URIUniform resource identifier (URI)
matlab.net.ArrayFormatConvert arrays in HTTP queries
matlab.net.QueryParameterParameter in query portion of uniform resource identifier (URI)

Fonctions

matlab.net.base64decodeBase 64 decoding of string
matlab.net.base64encodeBase 64 encoding of byte string or vector

Packages

matlab.net.httpSummary of packages and classes in MATLAB HTTP interface
matlab.net.http.fieldSummary of header field classes in MATLAB HTTP interface
matlab.net.http.ioStreaming content consumers and providers for HTTP messages

Rubriques