summaryrefslogtreecommitdiff
path: root/httpRequest.proto
blob: cc49b8707cbe7f96fc9b8fbb94b86fce6758b1bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0

syntax = "proto3";

package httppb;

import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp

message HttpRequest {                                      // HttpRequest represents the essential fields of an incoming HTTP request.
        string                      method           = 1;  // The request method, e.g., "GET", "POST".
        string                      url              = 2;  // The full URL of the request, including scheme, host, path, and query string.
        string                      route            = 3;  // just the route: "/add/" or "/find/"
        string                      proto            = 4;  // The protocol version, e.g., "HTTP/1.1", "HTTP/2.0".
        map<string, string>         headers          = 5;  // The map of request headers. Header names are case-insensitive,
        string                      remoteAddr       = 6;  // The remote IP address of the client, after resolving proxies.
        string                      host             = 7;  // The host on which the URL is sought (www.wit.com)
        string                      hostname         = 8;  // The hostname of the client if passed from the client (mylaptop.fun.me)
        bytes                       body             = 9;  // The request body as raw bytes.
        string                      namespace        = 10; // When the body is a pb (always!). This is the pb namespace ("go.wit.com/lib/protobuf/virtpb")
        google.protobuf.Timestamp   ctime            = 11; // create time of the patch
        repeated string             errors           = 12; // When the body is a pb (always!). This is the pb namespace ("go.wit.com/lib/protobuf/virtpb")
}

message HttpRequests {                                     // `autogenpb:marshal` `autogenpb:mutex`
        string                      uuid             = 1;  // `autogenpb:uuid:1524ed43-e57d-4bf9-9449-1cdfdc498605`
        string                      version          = 2;  // `autogenpb:version:v0.0.1`
        repeated HttpRequest        HttpRequests     = 3;  // THIS MUST BE  HttpRequest  and then  HttpRequests
}