Commit d2ca7bd2 authored by Elian Kraja's avatar Elian Kraja
Browse files

Small fix on the common definition to better define headers for get/delete and post/put

parent ad7a6adc
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ Package MEC_Common {
		type STRING;

        type HttpHeaders with
			content_type of type STRING,
			content_type of type STRING,    // content_type is optional, since not present in GET and DELETE. How to express this concept?
            authorization of type STRING,
			accept of type STRING
        ;
@@ -83,21 +83,26 @@ Package MEC_Common {
		type HTTP_MSG with
			uri of type  STRING,
			headers of type HttpHeaders,
			body of type JSON
			Message_Body of type JSON   // body is optional, since not present in GET and DELETE. How to express this concept?
		;

		STRING VALID_TOKEN;

        STRING "application/json";

        HttpHeaders vHeadersGet containing
        	accept set to "application/json",
			authorization set to VALID_TOKEN
		;

		HttpHeaders vHeaders containing
            content_type set to "application/json",
        	accept set to "application/json",
        	content_type set to "application/json",
			authorization set to VALID_TOKEN
		;
		
		HTTP_MSG vGET containing
			headers set to vHeaders
			headers set to vHeadersGet
		;

		HTTP_MSG vPOST containing
@@ -109,7 +114,7 @@ Package MEC_Common {
		;
		
		HTTP_MSG vDELETE containing
			headers set to vHeaders
			headers set to vHeadersGet
		;
	}