Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::api::Response Struct Reference

A complete response, produced off the loop and written by the framework. More...

#include <router.h>

Collaboration diagram for mm::api::Response:
[legend]

Public Attributes

std::string status = "200 OK"
 
std::string contentType = "application/json"
 
std::string body
 
std::vector< std::pair< std::string, std::string > > headers
 

Detailed Description

A complete response, produced off the loop and written by the framework.

A value rather than a sequence of calls on a response object: that is what lets a handler run anywhere, and what makes it testable by comparing the returned value.

Member Data Documentation

◆ body

std::string mm::api::Response::body

◆ contentType

std::string mm::api::Response::contentType = "application/json"

◆ headers

std::vector<std::pair<std::string, std::string> > mm::api::Response::headers

Extra headers beyond content type and CORS — Content-Disposition for a download, the hardening set on a user-supplied file, X-Wire-Us for a timed device operation.

◆ status

std::string mm::api::Response::status = "200 OK"

The documentation for this struct was generated from the following file: