class CommandLineContentNegotiationStrategy implements ContentNegotiationStrategy {

		private final UrlPathHelper urlPathHelper = new UrlPathHelper();

		@Override
		public List<MediaType> resolveMediaTypes(NativeWebRequest request) {<FILL_FUNCTION_BODY>}

	}

			String path = this.urlPathHelper
				.getPathWithinApplication(request.getNativeRequest(HttpServletRequest.class));
			if (!StringUtils.hasText(path) || !path.equals("/")) { // Only care about "/"
				return MEDIA_TYPE_ALL_LIST;
			}
			String userAgent = request.getHeader(HttpHeaders.USER_AGENT);
			if (userAgent != null) {
				Agent agent = Agent.fromUserAgent(userAgent);
				if (agent != null) {
					if (AgentId.CURL.equals(agent.getId()) || AgentId.HTTPIE.equals(agent.getId())) {
						return Collections.singletonList(MediaType.TEXT_PLAIN);
					}
				}
			}
			return Collections.singletonList(MediaType.APPLICATION_JSON);
		
<no_super_class>