Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Data Structures | Enumerations | Functions
URLRequest.h File Reference

A protocol-agnostic abstraction for requesting resources via URLs. More...

#include <Objectively/Data.h>
#include <Objectively/Dictionary.h>
#include <Objectively/Object.h>
#include <Objectively/URL.h>

Go to the source code of this file.

Data Structures

struct  URLRequest
 A protocol-agnostic abstraction for requesting resources via URLs. More...
 

Enumerations

enum  HTTPMethod {
  HTTP_NONE , HTTP_GET , HTTP_POST , HTTP_PUT ,
  HTTP_DELETE , HTTP_HEAD
}
 

Functions

OBJECTIVELY_EXPORT Class_URLRequest (void)
 

Detailed Description

A protocol-agnostic abstraction for requesting resources via URLs.

Definition in file URLRequest.h.

Enumeration Type Documentation

◆ HTTPMethod

enum HTTPMethod

The HTTP method verbs.

Enumerator
HTTP_NONE 
HTTP_GET 
HTTP_POST 
HTTP_PUT 
HTTP_DELETE 
HTTP_HEAD 

Definition at line 42 of file URLRequest.h.

42 {
HTTPMethod
Definition: URLRequest.h:42
@ HTTP_NONE
Definition: URLRequest.h:43
@ HTTP_PUT
Definition: URLRequest.h:46
@ HTTP_DELETE
Definition: URLRequest.h:47
@ HTTP_GET
Definition: URLRequest.h:44
@ HTTP_POST
Definition: URLRequest.h:45
@ HTTP_HEAD
Definition: URLRequest.h:48

Function Documentation

◆ _URLRequest()

OBJECTIVELY_EXPORT Class * _URLRequest ( void  )

Definition at line 122 of file URLRequest.c.

122 {
123 static Class *clazz;
124 static Once once;
125
126 do_once(&once, {
127 clazz = _initialize(&(const ClassDef) {
128 .name = "URLRequest",
129 .superclass = _Object(),
130 .instanceSize = sizeof(URLRequest),
131 .interfaceOffset = offsetof(URLRequest, interface),
132 .interfaceSize = sizeof(URLRequestInterface),
134 });
135 });
136
137 return clazz;
138}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
Definition: URLRequest.c:109
long Once
The Once type.
Definition: Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition: Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition: Class.h:41
The runtime representation of a Class.
Definition: Class.h:95
Class * _Object(void)
The Object archetype.
Definition: Object.c:136
A protocol-agnostic abstraction for requesting resources via URLs.
Definition: URLRequest.h:56