Remove charset from pact sample contract media type. Switch to explicitly
returning charset media type for other samples.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.example.fraud;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@@ -40,7 +41,7 @@ class FraudNameController {
|
||||
this.fraudVerifier = fraudVerifier;
|
||||
}
|
||||
|
||||
@PutMapping(value = "/frauds/name")
|
||||
@PutMapping(value = "/frauds/name", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
public NameResponse checkByName(@RequestBody NameRequest request) {
|
||||
boolean fraud = this.fraudVerifier.isFraudByName(request.getName());
|
||||
if (fraud) {
|
||||
@@ -50,7 +51,7 @@ class FraudNameController {
|
||||
"Don't worry " + request.getName() + " you're not a fraud");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/frauds/name")
|
||||
@GetMapping(value = "/frauds/name", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
public String checkByName(@CookieValue("name") String value,
|
||||
@CookieValue("name2") String value2) {
|
||||
return value + " " + value2;
|
||||
|
||||
Reference in New Issue
Block a user