Custom Routes and Payloads
Web request handlers for MATLAB® Production Server™ enable deployed MATLAB functions to behave as request handlers for HTTP requests.
A web request handler allows clients to send the server RESTful requests that contain custom HTTP headers and payloads. The request headers are available to the MATLAB function deployed to the server. The deployed function can return custom HTTP status codes and messages and custom payload to the client.
Using a web request handler, server administrators have the flexibility to map request URLs to any MATLAB function deployed to the server and to provide a mapping for serving static file content.
- Handle Custom Routes and Payloads in HTTP Requests
Set up flexible URL routing on the server and write MATLAB code for handling custom headers, custom payloads, and static file serving.
- Test Web Request Handlers (MATLAB Compiler SDK)
Configure access to the routes file in the Production Server Compiler app, then test MATLAB functions for deployment to MATLAB Production Server.