OpenSDN source code
rest_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef _ROOT_REST_COMMON_
7 #define _ROOT_REST_COMMON_
8 
9 #include <string>
10 
11 class HttpSession;
12 
13 namespace REST {
14 
15 void SendResponse(HttpSession *session, const std::string &msg,
16  int status_code = 200, std::string context="");
17 void SendErrorResponse(HttpSession *session, const std::string &error_msg,
18  int status_code = 500, std::string context="");
19 
20 } // namespace REST
21 
22 #endif // _ROOT_REST_COMMON_
void SendErrorResponse(HttpSession *session, const std::string &error_msg, int status_code, std::string context)
Definition: rest_common.cc:32
void SendResponse(HttpSession *session, const std::string &msg, int status_code, std::string context)
Definition: rest_common.cc:16