https://github.com/jacob-c-smith/http
Parse and serialize HTTP requests and responses
https://github.com/jacob-c-smith/http
c http
Last synced: 8 months ago
JSON representation
Parse and serialize HTTP requests and responses
- Host: GitHub
- URL: https://github.com/jacob-c-smith/http
- Owner: Jacob-C-Smith
- License: mit
- Created: 2023-09-07T18:50:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T19:54:36.000Z (over 1 year ago)
- Last Synced: 2025-03-04T22:36:24.256Z (12 months ago)
- Topics: c, http
- Language: C
- Homepage: https://g10.app/status/#parser_serializer
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http
[](https://github.com/Jacob-C-Smith/http/actions/workflows/cmake.yml)
Parse and serialize HTTP requests and responses
> 1 [Download](#download)
>
> 2 [Build](#build)
>
> 3 [Example](#example)
>
> 4 [Tester](#tester)
>
> 5 [Definitions](#definitions)
>
>> 5.1 [Type definitions](#type-definitions)
>>
>> 5.2 [Function definitions](#function-definitions)
## Download
To download http, execute the following command
```bash
$ git clone https://github.com/Jacob-C-Smith/http --recurse-submodules
```
## Build
To build on UNIX like machines, execute the following commands in the same directory
```bash
$ cd http
$ cmake .
$ make
```
This will build the example program, and dynamic / shared libraries
To build http for Windows machines, open the base directory in Visual Studio, and build your desired target(s)
## Example
TODO
## Tester
TODO
## Definitions
### Type definitions
```c
typedef enum http_request_type_e http_request_type;
typedef enum http_response_status_e http_response_status;
```
### Function definitions
```c
// Serializers
int http_serialize_request (
char *request_text,
http_request_type request_type,
const char *path,
const char *format,
...
);
// TODO: Implement
// int http_serialize_response ( );
// TODO: Parsers
// int http_parse_request ( );
// int http_parse_response ( );
```