30#define _Class _URLRequest
47 if (this->httpHeaders) {
82 if (this->httpHeaders) {
88 for (
size_t i = 0; i < keys->
count; i++) {
97 headersHash += pairHash;
115 return other && $(self,
isEqual, other);
118 return other == NULL;
144#pragma mark - URLRequest
184#pragma mark - Class lifecycle
210 .name =
"URLRequest",
213 .interfaceOffset = offsetof(
URLRequest, interface),
214 .interfaceSize =
sizeof(URLRequestInterface),
static ident objectAtIndex(const Array *self, size_t index)
static Array * init(Array *self)
ident release(ident obj)
Atomically decrement the given Object's reference count. If the resulting reference count is 0,...
Class * _initialize(const ClassDef *def)
Initializes the given Class.
ident retain(ident obj)
Atomically increment the given Object's reference count.
#define alloc(type)
Allocate and initialize and instance of type.
#define super(type, obj, method,...)
static void setObjectForKey(Dictionary *self, const ident obj, const ident key)
static Array * allKeys(const Dictionary *self)
static ident objectForKey(const Dictionary *self, const ident key)
int HashForInteger(int hash, const long integer)
Accumulates the hash value of integer into hash.
int HashForObject(int hash, const ident obj)
Accumulates the hash value of object into hash.
Utilities for calculating hash values.
#define HASH_SEED
The hash seed value.
static bool isKindOfClass(const Object *self, const Class *clazz)
String * str(const char *fmt,...)
void * ident
The identity type, similar to Objective-C id.
static URLRequest * initWithURL(URLRequest *self, URL *url)
static void setValueForHTTPHeaderField(URLRequest *self, const char *value, const char *field)
static bool isEqual(const Object *self, const Object *other)
static bool objectEquals(const Object *self, const Object *other)
Tests equality of two Objects, accounting for NULL.
static void dealloc(Object *self)
static Object * copy(const Object *self)
static void initialize(Class *clazz)
Class * _URLRequest(void)
static int hash(const Object *self)
A protocol-agnostic abstraction for requesting resources via URLs.
#define do_once(once, block)
Executes the given block at most one time.
size_t count
The count of elements.
ClassDefs are passed to _initialize via an archetype to initialize a Class.
The runtime representation of a Class.
ident interface
The interface of the Class.
Object is the root Class of The Objectively Class hierarchy.
int hash(const Object *self)
Uniform Resource Locators (RFC 3986).
A protocol-agnostic abstraction for requesting resources via URLs.
HTTPMethod httpMethod
The HTTP request method.
Dictionary * httpHeaders
The HTTP request headers.
void setValueForHTTPHeaderField(URLREquest *self, const char *value, const char *field)
Data * httpBody
The HTTP request body, sent as POST or PUT data.