List of usage examples for org.springframework.http RequestEntity patch
public static BodyBuilder patch(URI url)
From source file:org.zalando.github.spring.TeamsTemplate.java
@Override public Team updateTeam(long teamId, TeamRequest teamRequest) { Map<String, Object> uriVariables = new HashMap<>(); uriVariables.put("teamid", teamId); RequestEntity<TeamRequest> entity = RequestEntity.patch(buildUri("/teams/{teamid}", uriVariables)) .contentType(MediaType.APPLICATION_JSON).body(teamRequest); return getRestOperations().exchange(entity, Team.class).getBody(); }
From source file:org.zalando.github.spring.OrganizationsTemplate.java
@Override public ExtOrganization updateOrganization(OrganizationUpdate update, String organization) { Map<String, Object> uriVariables = new HashMap<>(); uriVariables.put("organization", organization); RequestEntity<OrganizationUpdate> entity = RequestEntity .patch(buildUri("/orgs/{organization}", uriVariables)).contentType(MediaType.APPLICATION_JSON) .body(update);/* w w w .ja va 2 s. c o m*/ return getRestOperations().exchange(entity, ExtOrganization.class).getBody(); }