#include <assert.h>
#include "MutableDictionary.h"
#include "URLRequest.h"
Go to the source code of this file.
◆ _Class
◆ _URLRequest()
Class * _URLRequest |
( |
void |
| ) |
|
Definition at line 122 of file URLRequest.c.
122 {
125
128 .name = "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.
static void initialize(Class *clazz)
#define do_once(once, block)
Executes the given block at most one time.
ClassDefs are passed to _initialize via an archetype to initialize a Class.
The runtime representation of a Class.
Class * _Object(void)
The Object archetype.
A protocol-agnostic abstraction for requesting resources via URLs.
◆ copy()
- See also
- Object::copy(const Object *)
Definition at line 36 of file URLRequest.c.
36 {
37
39
41
42 if (this->httpBody) {
44 }
45
46 if (this->httpHeaders) {
48 }
49
51}
#define alloc(type)
Allocate and initialize and instance of type.
Immutable key-value stores.
Object is the root Class of The Objectively Class hierarchy.
Object * copy(const Object *self)
Creates a shallow copy of this Object.
Dictionary * httpHeaders
The HTTP request headers.
URLRequest * initWithURL(URLRequest *self, URL *url)
Initializes this URLRequest with the specified URL.
Data * httpBody
The HTTP request body, sent as POST or PUT data.
◆ dealloc()
static void dealloc |
( |
Object * |
self | ) |
|
|
static |
- See also
- Object::dealloc(Object *)
Definition at line 56 of file URLRequest.c.
56 {
57
59
63
65}
ident release(ident obj)
Atomically decrement the given Object's reference count. If the resulting reference count is 0,...
#define super(type, obj, method,...)
void dealloc(Object *self)
Frees all resources held by this Object.
◆ initialize()
static void initialize |
( |
Class * |
clazz | ) |
|
|
static |
- See also
- Class::initialize(Class *)
Definition at line 109 of file URLRequest.c.
109 {
110
113
116}
ident interface
The interface of the Class.
void setValueForHTTPHeaderField(URLREquest *self, const char *value, const char *field)
◆ initWithURL()
Definition at line 73 of file URLRequest.c.
73 {
74
75 assert(url);
76
78 if (self) {
80 }
81
82 return self;
83}
ident retain(ident obj)
Atomically increment the given Object's reference count.
Condition * init(Condition *self)
Initializes this Condition.
◆ setValueForHTTPHeaderField()
static void setValueForHTTPHeaderField |
( |
URLRequest * |
self, |
|
|
const char * |
value, |
|
|
const char * |
field |
|
) |
| |
|
static |
Definition at line 89 of file URLRequest.c.
89 {
90
93 }
94
97
99
102}
Mutable key-value stores.
void setObjectForKey(MutableDictionary *self, const ident obj, const ident key)
Sets a pair in this MutableDictionary.
OBJECTIVELY_EXPORT String * str(const char *fmt,...)
A convenience function for instantiating Strings.