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