Elements of types Return, Intermediate Return and Throw have the option to return a HTTP Response result. This return type is used by HTTP and API triggers to build the actual HTTP response returned to the caller.
Other triggers, e.g. Queue triggers do not have any special handling for the HTTP return type; if it is used, they will just return the given result structure as JSON.
The HTTP Response allows you to define the HTTP status code, the content type, encoding and HTTP headers. Note that the "Http content" field expects Text (or JSON/XML etc.) as the input type. Object references will not get serialized, so any custom Expressions need to return a string.
Starting from version 4.5.4, you can also return binary HTTP responses. Selecting "HTTP Binary response" as the return type lets you give an expression that returns a byte array to the "Http bytes" field.
Note that the when using the HTTP Response or HTTP Binary Response return types, the HTTP request handler will skip all content negotiation: the response will have the content type and encoding given, even if the request had an ACCEPT header with a specific request, e.g. for application/xml.