-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
As a RestClient consumer, I want to define the content-type of request body explicitly in yaml definition to make it more descriptive instead using header's content-type.
Acceptance criteria
- If the RestCall contain body, content-type is required.
- If content-type is missing should log warning and fail to invoke instead of using a default one
- The content-type of body is equivalent to request header content-type, but if both were defined in restCall, the body content-type should override the header content-type, and/or log warning
Current
baseUrl: http://localhost:${wiremockPort} restCalls: createNewArticle: method: POST entityClass: java.lang.String responseContentType: application/json path: /createNew body: {content} headers: Content-Type: multipart/form-data
If request header content-type is missing, the "application/json" content-type is set by default on backend
Expect
baseUrl: http://localhost:${wiremockPort} restCalls: createNewArticle: method: POST entityClass: java.lang.String responseContentType: application/json path: /createNew body: content: {content} contentType: multipart/form-data headers: Content-Type: application/json << this will be overridden by body contentType
Acceptance criteria