Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3주차 미션 / 서버 3조 김나은 #13

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Nico1eKim
Copy link

No description provided.

Copy link

@JangIkhwan JangIkhwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요!! 코드를 보니 미션을 잘 수행해주신 것 같아요 👍

Comment on lines +21 to +25
String body = request.getBody();
Map<String, String> params = HttpRequestUtils.parseQueryParameter(body);

String userId = params.get(USER_ID.getKey());
String password = params.get(PASSWORD.getKey());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파라미터를 파싱하는 걸 컨트롤러 대신에 httpRequest에서 처리하는 것도 괜찮을 것 같아요.

Comment on lines +17 to +27
public static HttpRequest from(BufferedReader br) throws IOException {
String startLine = br.readLine();
HttpRequestStartLine httpStartLine = HttpRequestStartLine.from(startLine);

HttpRequestHeaders httpHeaders = HttpRequestHeaders.from(br);

int contentLength = httpHeaders.getContentLength();
HttpRequestBody httpBody = HttpRequestBody.from(br, contentLength);

return new HttpRequest(httpStartLine, httpHeaders, httpBody);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여러 객체에 역할을 적절히 나누신 것 같네요!


import static http.HttpHeader.*;

public class HttpRequestHeaders {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일급 컬렉션을 잘 사용하신 것 같아요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants