Java Code Examples for org.springframework.http.HttpMethod#POST

The following examples show how to use org.springframework.http.HttpMethod#POST . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebExchangeDataBinderTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
private ServerWebExchange exchange(MultiValueMap<String, String> formData) {

		MockClientHttpRequest request = new MockClientHttpRequest(HttpMethod.POST, "/");

		new FormHttpMessageWriter().write(Mono.just(formData),
				forClassWithGenerics(MultiValueMap.class, String.class, String.class),
				MediaType.APPLICATION_FORM_URLENCODED, request, Collections.emptyMap()).block();

		return MockServerWebExchange.from(
				MockServerHttpRequest
						.post("/")
						.contentType(MediaType.APPLICATION_FORM_URLENCODED)
						.body(request.getBody()));
	}
 
Example 2
Source File: UpdateFeeConfigListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 3
Source File: UpdateRoomListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 4
Source File: UpdateUnitListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 5
Source File: PublishWechatMenuListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 6
Source File: UpdateNoticeListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 7
Source File: SaveFastuserListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 8
Source File: UpdateTaskListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 9
Source File: DeleteRoomListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 10
Source File: UserSendSmsListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 11
Source File: DeleteMappingListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 12
Source File: SaveCarBlackWhiteListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 13
Source File: WireMockSnippetTests.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
private OperationRequest requestPostWithXmlContentType() {
	return new OperationRequest() {

		@Override
		public byte[] getContent() {
			String content = "<name>foo</name>";
			return content.getBytes(Charset.forName("UTF-8"));
		}

		@Override
		public String getContentAsString() {
			return "<name>foo</name>";
		}

		@Override
		public HttpHeaders getHeaders() {
			HttpHeaders httpHeaders = new HttpHeaders();
			httpHeaders.add("Content-Type", MediaType.APPLICATION_XML_VALUE);
			return httpHeaders;
		}

		@Override
		public HttpMethod getMethod() {
			return HttpMethod.POST;
		}

		@Override
		public Parameters getParameters() {
			return null;
		}

		@Override
		public Collection<OperationRequestPart> getParts() {
			return null;
		}

		@Override
		public URI getUri() {
			return URI.create("https://foo/bar");
		}

		@Override
		public Collection<RequestCookie> getCookies() {
			return Collections.emptySet();
		}
	};
}
 
Example 14
Source File: ExitParkingSpaceListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 15
Source File: SaveDemoConfigListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 16
Source File: DeleteAdvertListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 17
Source File: UpdateCommunityListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 18
Source File: SaveUnitListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 19
Source File: DeleteWorkflowListener.java    From MicroCommunity with Apache License 2.0 4 votes vote down vote up
@Override
public HttpMethod getHttpMethod() {
    return HttpMethod.POST;
}
 
Example 20
Source File: MockMvcRequestBuilders.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Create a {@link MockHttpServletRequestBuilder} for a POST request.
 * @param uri the URL
 * @since 4.0.3
 */
public static MockHttpServletRequestBuilder post(URI uri) {
	return new MockHttpServletRequestBuilder(HttpMethod.POST, uri);
}