# mcorest_api_status_

Send API status code to the web service caller.

### For an overview see page Web Services

### Prototypes

      void mcorest_api_status_ok(mcohs_request_h req);

      void mcorest_api_status_bad_request(mcohs_request_h req, const char *info);

      void mcorest_api_status_internal_error(mcohs_request_h req, const char *info);

      void mcorest_api_status_not_found(mcohs_request_h req);

      void mcorest_api_status_unauthorized(mcohs_request_h req, const char *auth_realm);

      void mcorest_api_status_forbidden(mcohs_request_h req);

### Arguments

req | MCO EWS HTTP request object to write the response into
info | Optional additional information (plain text)
auth_realm | HTTP basic authentication realm

### Description

The handler routine (see `mcorest_api_handler_fn` ) will call any of these functions to send status to the web service caller:

mcorest_api_status_ok() | Sends HTTP OK response. This function should be called explicitly prior to sending any JSON data
mcorest_api_status_bad_request() | Sends HTTP "bad request" response. No further content should be sent
mcorest_api_status_internal_error() | Sends HTTP "internal error" response. No further content should be sent
mcorest_api_status_not_found() | Sends HTTP "not found" response. No further content should be sent
mcorest_api_status_unauthorized() | Sends HTTP "unauthorized" response. No further content should be sent
mcorest_api_status_forbidden() | Sends HTTP "forbidden" response. No further content should be sent

### Return Codes

void | No value returned

### Files

Header file:
mcorestapi.h
Source file:
mcorestapi.c
Library:
libmcorest.a