Skip to content

Completion of HTTP Service #8

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions text/0003-complete-httpservice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
- Start Date: 2019-10-02
- RFC PR: (in a subsequent commit to the PR, fill me with the PR's URL)
- CppMicroServices Issue: https://github.com/CppMicroServices/CppMicroServices/issues/196

# Complete implementation of HTTPService

## Summary

> The current implementation of HTTPService is not complete and prevent CppMicroServices to be used as base for a fully-fledged REST backend.

## Motivation

> We are using CppMicroServices as a backend for a desktop/network application which use a Javascript frontend. Hence we need support for all HTTP verbs and also support for file upload.

## Detailed design

> Complete POST, GET and PUT HTTP methods
> Implement management of file upload using POST/multipart, following the Servlet(c) API
> Allow to provide options to CivetWeb when starting a ServletContainer
> Implement unit/functional tests for HttpService
> Allow to run GTest in a HttpService-enabled environment

## How we teach this

> This enhancement must not break existing usage of HttpService. Say, we add features and no not break existing one.

## Drawbacks

> We expect changes in core code to allow fine-grained testing of HTTP layer without launching a full container. This implies to implement new layer on top of some components to allow them to be mocked.

## Alternatives

> Alternative would be to drop current implementation, which rely on CivetWeb server[1] and use more REST friendly library. But this would break the general web purpose of HTTPService.

## Unresolved questions

> Some core code has been modified in the current WIP branch. This could be an issue. We did that to allow fine-grained testing of our implementation.

[1]: https://civetweb.github.io/civetweb/