Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery.common.cpp
/
Microservice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3814aaac
authored
Jun 22, 2017
by
amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix WriteObjectToResponse of MsgArchiver to construct BaseRestResponse
parent
e3256b61
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
README.md
src/common/Microservice_Iface.h
README.md
View file @
3814aaac
## C++ Microservice Framework
## VERSIONS:
# 1.4.1
-
add nlohman json to write/read response/request
# 1.4.0
-
Add colorful logging
# 1.3.0
...
...
src/common/Microservice_Iface.h
View file @
3814aaac
...
...
@@ -396,9 +396,13 @@ namespace nsMicroservice_Iface
template
<
typename
Msg
>
void
WriteObjectToResponse
(
nsMicroservice_Iface
::
IResponse
*
pti_Response
,
IMsgArchiver
<
Msg
>&
archiver
,
Msg
&
inMsg
){
std
::
string
outStr
;
std
::
ostringstream
c_OutputStream
;
if
(
archiver
.
build
(
inMsg
,
outStr
).
IsSuccess
()){
pti_Response
->
Send
(
outStr
.
c_str
());
c_OutputStream
<<
nsMicroservice_Constants
::
SUCCESS_REST_RESPONSE_TEMPLATE
<<
outStr
.
c_str
()
<<
'}'
;
}
else
{
c_OutputStream
<<
nsMicroservice_Constants
::
SUCCESS_NULL_REST_RESPONSE_TEMPLATE
<<
'}'
;
}
pti_Response
->
Send
(
c_OutputStream
.
str
().
c_str
());
}
////////// PUB/SUB ////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment