@Override
	public EurekaHttpResponse<InstanceInfo> sendHeartBeat(String appName, String id, InstanceInfo info,
			InstanceStatus overriddenStatus) {
		final Function<UriBuilder, URI> uriFunction = builder -> builder.pathSegment("apps", appName, id)
			.queryParam("status", info.getStatus().toString())
			.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
			.queryParamIfPresent("overriddenstatus", Optional.ofNullable(overriddenStatus).map(InstanceStatus::name))
			.build();

		final ResponseEntity<InstanceInfo> response = restClient.put()
			.uri(uriFunction)
			.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
			.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
			.retrieve()
			.toEntity(InstanceInfo.class);

		final EurekaHttpResponseBuilder<InstanceInfo> builder = anEurekaHttpResponse(statusCodeValueOf(response),
				InstanceInfo.class)
			.headers(headersOf(response));

		final InstanceInfo entity = response.getBody();
		if (entity != null) {
			builder.entity(entity);
		}

		return builder.build();
	}
{@link RestClient} implementation of {@link EurekaHttpClient}.

@author Wonchul Heo
@since 4.2.0
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestClientEurekaHttpClient.java