Module mod_ocs_rest_get

Handle received HTTP GET requests.

Copyright © 2016 - 2026 SigScale Global Inc.

Description

Handle received HTTP GET requests.

This is an httpd callback module handling HTTP GET operations. The HTTP resources are managed in modules named ocs_rest_res_*.

Resource Handler Functions

The resource handler modules should implement callback functions in the pattern described in the example below.

get_<Collection>/2

get_<Collection>(Query, Headers) -> Result

Resource handlers for HTTP GET operations on REST Collections.

Response Headers must include content_type if ResponseBody is not en empty list. An optional Problem report may be provided in error responses which shall be formatted by format_problem/2 and included in the response body.

get_<Resource>/2

get_<Resource>(Id, Query, [Headers, ...]) -> Result

Resource handlers for HTTP GET operations on REST Resources.

Response Headers must include content_type if ResponseBody is not en empty list. An optional Problem report may be provided in error responses which shall be formatted by format_problem/2 and included in the response body.

Function Index

do/1Erlang web server API callback function.

Function Details

do/1

do(ModData) -> Result

Erlang web server API callback function.


Generated by EDoc