Commit 28ce511f authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix content type error for response message

parent a55a4bda
......@@ -40,6 +40,6 @@ UDR =
MYSQL_USER = "@MYSQL_USER@";
MYSQL_PASS = "@MYSQL_PASS@";
MYSQL_DB = "@MYSQL_DB@";
DB_CONNECTION_TIMEOUT = 10; # Reset the connection to the DB after expiring the timeout (in second)
DB_CONNECTION_TIMEOUT = 300; # Reset the connection to the DB after expiring the timeout (in second)
};
};
......@@ -73,6 +73,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(
......@@ -88,6 +91,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -66,6 +66,9 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -62,6 +62,9 @@ void AuthenticationDataDocumentApiImpl::create_auth_subs_data(
code = static_cast<Pistache::Http::Code>(httpCode);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, responseData.dump().c_str());
}
......@@ -75,6 +78,9 @@ void AuthenticationDataDocumentApiImpl::delete_auth_subs_data(
code = static_cast<Pistache::Http::Code>(httpCode);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, responseData.dump().c_str());
}
......
......@@ -59,6 +59,9 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......@@ -73,6 +76,9 @@ void AuthenticationStatusDocumentApiImpl::delete_authentication_status(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
void AuthenticationStatusDocumentApiImpl::query_authentication_status(
......@@ -88,6 +94,9 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -65,6 +65,9 @@ void AuthenticationSubscriptionDocumentApiImpl::
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......@@ -82,6 +85,9 @@ void AuthenticationSubscriptionDocumentApiImpl::
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -81,6 +81,9 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(
......@@ -96,6 +99,9 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -72,6 +72,9 @@ void SDMSubscriptionsCollectionApiImpl::querysdmsubscriptions(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -74,6 +74,9 @@ void SMFRegistrationDocumentApiImpl::delete_smf_context(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
void SMFRegistrationDocumentApiImpl::query_smf_registration(
......@@ -90,6 +93,9 @@ void SMFRegistrationDocumentApiImpl::query_smf_registration(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -59,6 +59,9 @@ void SMFRegistrationsCollectionApiImpl::query_smf_reg_list(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
......@@ -64,6 +64,9 @@ void SMFSelectionSubscriptionDataDocumentApiImpl::query_smf_select_data(
code = static_cast<Pistache::Http::Code>(http_code);
Logger::udr_server().debug("HTTP Response code %d.\n", code);
// content type
response.headers().add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType("application/json"));
response.send(code, response_data.dump().c_str());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment