glitchedhttps
glitchedhttps_request.h
Go to the documentation of this file.
1/*
2 Copyright 2020 Raphael Beck
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
22#ifndef GLITCHEDHTTPS_REQUEST_H
23#define GLITCHEDHTTPS_REQUEST_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <stddef.h>
30#include <string.h>
31#include "glitchedhttps_api.h"
33
38{
43 char* url;
44
48 size_t url_length;
49
56
66 char* content;
67
72
77
82
87
92
99
104
109
117};
118
123static inline void glitchedhttps_request_init(struct glitchedhttps_request* request)
124{
125 if (request == NULL)
126 return;
127
128 memset(request, 0x00, sizeof(struct glitchedhttps_request));
129}
130
131#ifdef __cplusplus
132} // extern "C"
133#endif
134
135#endif // GLITCHEDHTTPS_REQUEST_H
API macro for dllexport/dllimport.
HTTP Method to use for a glitchedhttps_request.
glitchedhttps_method
HTTP Method to use for a glitchedhttps_request.
Definition: glitchedhttps_method.h:37
static void glitchedhttps_request_init(struct glitchedhttps_request *request)
Definition: glitchedhttps_request.h:123
HTTP request (or response) header (for example: type="Authorization" ; value="Basic YWxhZGRpbjpvcGVuc...
Definition: glitchedhttps_header.h:36
Struct containing an HTTP request's parameters and headers.
Definition: glitchedhttps_request.h:38
char * content
Definition: glitchedhttps_request.h:66
char * content_type
Definition: glitchedhttps_request.h:76
char * content_encoding
Definition: glitchedhttps_request.h:86
size_t additional_headers_count
Definition: glitchedhttps_request.h:103
enum glitchedhttps_method method
Definition: glitchedhttps_request.h:55
char * url
Definition: glitchedhttps_request.h:43
size_t content_encoding_length
Definition: glitchedhttps_request.h:91
size_t buffer_size
Definition: glitchedhttps_request.h:108
size_t content_type_length
Definition: glitchedhttps_request.h:81
size_t url_length
Definition: glitchedhttps_request.h:48
struct glitchedhttps_header * additional_headers
Definition: glitchedhttps_request.h:98
size_t content_length
Definition: glitchedhttps_request.h:71
int ssl_verification_optional
SET THIS TO FALSE!
Definition: glitchedhttps_request.h:116