Commit 627c46dc authored by YannGarcia's avatar YannGarcia
Browse files

Merge branch 'STF525' of https://forge.etsi.org/gitlab/LIBS/LibIts into STF525

parents 11218bf3 4c79dd3f
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -127,6 +127,14 @@ module LibItsHttp_Templates {
          body          := p_body
      } // End of template mw_http_response_ok
      
      template (present) Response mw_http_response_201_created(
                                                               template (present) HttpMessageBody p_body := ?,
                                                               template (present) HeaderLines p_header := ?
      ) modifies mw_http_response_ok := {
          statuscode    := 201,
          statustext    := ?//"Created",
      } // End of template mw_http_response_ok
      
      template (value) Response m_http_response_ko(
                                                   in template (value) HttpMessageBody p_body,
                                                   in template (value) HeaderLines p_header,
@@ -166,13 +174,29 @@ module LibItsHttp_Templates {
          body          := p_body
      } // End of template mw_http_response_ko
      
      template Response mw_http_response_400_bad_request(
                                                         template HttpMessageBody p_body  := *,
                                                         template (present) HeaderLines p_header := ?
      ) modifies mw_http_response_ko := {
          statuscode    := 400,
          statustext    := ? // TODO Add pattern for not found
      } // End of template mw_http_response_400_bad_request
      
      template Response mw_http_response_403_forbidden(
                                                       template HttpMessageBody p_body  := *,
                                                       template (present) HeaderLines p_header := ?
      ) modifies mw_http_response_ko := {
          statuscode    := 403,
          statustext    := ? // TODO Add pattern for not found
      } // End of template mw_http_response_404_not_found
      
      template Response mw_http_response_404_not_found(
                                                       template HttpMessageBody p_body  := *,
                                                       template (present) HeaderLines p_header := ?
      ) modifies mw_http_response_ko := {
          statuscode    := 404,
          statustext    := ? // TODO Add pattern for not found
      } // End of template mw_http_response_ok
      } // End of template mw_http_response_404_not_found
      
    } // End of group http_responses
    
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ module LibItsHttp_TypesAndValues {
    const charstring c_header_connection := "Connection";
    const charstring c_header_pragma := "Pragma";
    const charstring c_header_cache_control := "Cache-Control";
    const charstring c_header_authorization := "Authorization";
    
    const integer c_http_version_major := PICS_HTTP_VERSION_MAJOR;
    const integer c_http_version_minor := PICS_HTTP_VERSION_MINOR;