Examples of toUriString()


Examples of org.springframework.web.util.UriComponents.toUriString()

  @Test
  public void usesForwardedHostAndPortFromHeader() {
    request.addHeader("X-Forwarded-Host", "foobar:8088");
    UriComponents uriComponents = fromController(PersonControllerImpl.class).build();

    assertThat(uriComponents.toUriString(), startsWith("http://foobar:8088"));
  }

  @Test
  public void usesFirstHostOfXForwardedHost() {
    request.addHeader("X-Forwarded-Host", "barfoo:8888, localhost:8088");
View Full Code Here

Examples of org.springframework.web.util.UriComponents.toUriString()

  @Test
  public void usesFirstHostOfXForwardedHost() {
    request.addHeader("X-Forwarded-Host", "barfoo:8888, localhost:8088");
    UriComponents uriComponents = fromController(PersonControllerImpl.class).build();

    assertThat(uriComponents.toUriString(), startsWith("http://barfoo:8888"));
  }


  static class Person {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.