Commit b5194ecd authored by YannGarcia's avatar YannGarcia
Browse files

Update response template for DELETE

parent 26b8f58b
...@@ -49,8 +49,8 @@ module LibItsHttp_Templates { ...@@ -49,8 +49,8 @@ module LibItsHttp_Templates {
group http_headers { group http_headers {
template (value) Header m_header_line( template (value) Header m_header_line(
in template (value) charstring p_header_name, in template (value) charstring p_header_name,
in template (value) charstring_list p_header_value in template (value) charstring_list p_header_value
) := { ) := {
header_name := p_header_name, header_name := p_header_name,
header_value := p_header_value header_value := p_header_value
...@@ -177,6 +177,17 @@ module LibItsHttp_Templates { ...@@ -177,6 +177,17 @@ module LibItsHttp_Templates {
body := omit body := omit
} // End of template m_http_response_ok_no_body } // End of template m_http_response_ok_no_body
template (present) Response mw_http_response_ok_no_body(
template (present) Headers p_header := ?
) := {
version_major := 1,
version_minor := 1,
statuscode := 200,
statustext := "OK",
header := p_header,
body := omit
} // End of template mw_http_response_ok_no_body
template (value) Response m_http_response_204_no_content( template (value) Response m_http_response_204_no_content(
in template (value) Headers p_header in template (value) Headers p_header
) modifies m_http_response_ok_no_body := { ) modifies m_http_response_ok_no_body := {
...@@ -202,7 +213,7 @@ module LibItsHttp_Templates { ...@@ -202,7 +213,7 @@ module LibItsHttp_Templates {
) modifies mw_http_response_ok := { ) modifies mw_http_response_ok := {
statuscode := 201, statuscode := 201,
statustext := "Created" statustext := "Created"
} // End of template mw_http_response_ok } // End of template mw_http_response_201_created
template (present) Response mw_http_response_202_accepted( template (present) Response mw_http_response_202_accepted(
template (present) HttpMessageBody p_body := ?, template (present) HttpMessageBody p_body := ?,
...@@ -210,15 +221,14 @@ module LibItsHttp_Templates { ...@@ -210,15 +221,14 @@ module LibItsHttp_Templates {
) modifies mw_http_response_ok := { ) modifies mw_http_response_ok := {
statuscode := 202, statuscode := 202,
statustext := "Accepted" statustext := "Accepted"
} // End of template mw_http_response_ok } // End of template mw_http_response_202_accepted
template (present) Response mw_http_response_204_no_content( template (present) Response mw_http_response_204_no_content(
template (present) HttpMessageBody p_body := ?, template (present) Headers p_header := ?
template (present) Headers p_header := ? ) modifies mw_http_response_ok_no_body := {
) modifies mw_http_response_ok := {
statuscode := 204, statuscode := 204,
statustext := "No Content" statustext := "No Content"
} // End of template mw_http_response_ok } // End of template mw_http_response_204_no_content
template (value) Response m_http_response_ko( template (value) Response m_http_response_ko(
in template (value) HttpMessageBody p_body, in template (value) HttpMessageBody p_body,
...@@ -247,6 +257,19 @@ module LibItsHttp_Templates { ...@@ -247,6 +257,19 @@ module LibItsHttp_Templates {
body := omit body := omit
} // End of template m_http_response_ko_no_body } // End of template m_http_response_ko_no_body
template (present) Response mw_http_response_ko_no_body(
template (present) Headers p_header := ?,
template (present) integer p_statuscode := 404,
template (present) charstring p_statustext := "Not found"
) := {
version_major := 1,
version_minor := 1,
statuscode := p_statuscode,
statustext := p_statustext,
header := p_header,
body := omit
} // End of template mw_http_response_ko_no_body
template Response mw_http_response_ko( template Response mw_http_response_ko(
template HttpMessageBody p_body := *, template HttpMessageBody p_body := *,
template (present) Headers p_header := ? template (present) Headers p_header := ?
......
Supports Markdown
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