jhannes-playpen / innlevering-1-http

PGR200 Innlevering #1: HTTP klient og server utviklet med Sockets og Server Sockets
4 stars 0 forks source link

Opprett en HttpPath og HttpQuery klasse som kan parse en HTTP request line request URI #4

Open jhannes opened 6 years ago

jhannes commented 6 years ago

Endelig test:

@Test
public void shouldParseUrl() {
    HttpPath path = new HttpPath("/myapp/echo?status=402&body=vi%20plukker%20bl%C3%A5b%C3%A6r"
    assertThat(path.getPath()).isEqualTo("/myapp/echo");
    assertThat(path.getPathParts()).containsExactly("myapp", "echo");
    assertThat(path.getQuery().getParameter("status")).isEqualTo("400");
    assertThat(path.getQuery().getParameter("body")).isEqualTo("vi plukker blåbær");
}
Alacho2 commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-Alacho2#4

inawilhelmsen commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-ouniv#4

Hytro commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-Hytro#4

MikaelSvanasbakken commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-MikaelSvanasbakken#4

CaptainMomon commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-CaptainMomon#4

Markusdreyer commented 6 years ago

This issue was moved to Westerdals/command-line-parser-exercise-Markusdreyer#4

TorgrimLaur commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-TorgrimLaur#4

ChrisFFRR commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-ChrisFFRR#4

jonmahei commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-heijon17#5

Tharin2501 commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-Tharin2501#4

beccarella commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-beccarella#4

thatra94 commented 6 years ago

This issue was moved to Westerdals/http-request-and-server-gulasiater#4