Skip to content

Sprint_9-solution-http-api Реализовать API#5

Merged
Alexander-skipper merged 1 commit intomainfrom
sprint_9-solution-http-api
Aug 14, 2025
Merged

Sprint_9-solution-http-api Реализовать API#5
Alexander-skipper merged 1 commit intomainfrom
sprint_9-solution-http-api

Conversation

@Alexander-skipper
Copy link
Copy Markdown
Owner

Реализовать API.

}

protected void sendText(HttpExchange exchange, String text) throws IOException {
sendResponse(exchange, text, 200);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Коды ответов лучше вынести в константы

String path = exchange.getRequestURI().getPath();

switch (method) {
case "GET":
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Названия методов также можно вынести в константы

@Alexander-skipper Alexander-skipper merged commit 9b268c6 into main Aug 14, 2025
1 check passed
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