glitchedhttps
|
Struct containing an HTTP request's parameters and headers. More...
#include <glitchedhttps_request.h>
Public Attributes | |
char * | url |
size_t | url_length |
enum glitchedhttps_method | method |
char * | content |
size_t | content_length |
char * | content_type |
size_t | content_type_length |
char * | content_encoding |
size_t | content_encoding_length |
struct glitchedhttps_header * | additional_headers |
size_t | additional_headers_count |
size_t | buffer_size |
int | ssl_verification_optional |
SET THIS TO FALSE! More... | |
Struct containing an HTTP request's parameters and headers.
struct glitchedhttps_header* glitchedhttps_request::additional_headers |
[OPTIONAL] Additional headers for the HTTP request.
Set this to NULL
if you don't want to add any additional HTTP request headers.
You can create headers using the glitchedhttps_header_init() function.
size_t glitchedhttps_request::additional_headers_count |
The amount of passed additional HTTP request headers (pass zero if there's none).
size_t glitchedhttps_request::buffer_size |
How big should the underlying text buffer be?
char* glitchedhttps_request::content |
The HTTP request body. Set this to NULL
if you don't want to send a request body.
Note that this is ignored for GET requests, as well as every other HTTP Method that does not recommend the inclusion of a body... And if your server looks for it nonetheless you're infringing the RFC2616 recommendation!
char* glitchedhttps_request::content_encoding |
The request body's encoding (e.g. "gzip").
size_t glitchedhttps_request::content_encoding_length |
content_encoding string length.
size_t glitchedhttps_request::content_length |
Content-Length header that tells the server how many bytes to read from the message body. If this is zero, strlen(content)
will be used!
char* glitchedhttps_request::content_type |
The mime-type of the request body content (e.g. text/plain; charset=utf-8).
size_t glitchedhttps_request::content_type_length |
content_type string length.
enum glitchedhttps_method glitchedhttps_request::method |
The request's HTTP method (E.g. GET, POST, ...).
Please remember that only POST, PUT and PATCH requests should send a request body (via content
parameter here).
int glitchedhttps_request::ssl_verification_optional |
SET THIS TO FALSE!
It's best to leave this set to 0
.
Only set this to 1
if you don't want to enforce verification of the server's SSL certificate (DEFINITIVELY NOT RECOMMENDED FOR PRODUCTION ENV!).
This value is only taken into consideration in case of an HTTPS request (determined by the scheme defined in the url). Plain HTTP requests ignore this setting.
char* glitchedhttps_request::url |
The full, uncensored URL for the HTTP POST request including protocol, host name, port (optional), resource URI and query parameters (if any).
size_t glitchedhttps_request::url_length |
url string length.