ProtoObjectObjectWARequest
| cookies | fields | headers | method | nativeRequest | url |
| instance | class |
|---|---|
accessing
|
as yet unclassified |
| cookies |
|---|
|
| fields |
|---|
|
| headers |
|---|
|
| method |
|---|
|
| nativeRequest |
|---|
|
| url |
|---|
|
| accessing |
|---|
| at: key |
^ fields at: key |
| at: key ifAbsent: aBlock |
^ fields at: key ifAbsent: aBlock |
| cookies |
^ cookies |
| fields |
^ fields |
| headerAt: aKey |
^ self headerAt: aKey ifAbsent: [] |
| headerAt: aKey ifAbsent: aBlock |
^ headers at: aKey ifAbsent: aBlock |
| headers |
^ headers |
| method |
^ method |
| nativeRequest |
^ nativeRequest |
| nativeRequest: aRequest |
nativeRequest _ aRequest |
| password |
^ self authorization ifNotNilDo: [:auth | auth copyAfter: $:] |
| url |
^ url |
| user |
^ self authorization ifNotNilDo: [:auth | auth copyUpTo: $:] |
| private |
|---|
| authorization |
^ (self headerAt: 'Authorization' ifAbsent: [self headerAt: 'authorization']) ifNotNilDo: [:auth | self decodeAuthorization: auth] |
| decodeAuthorization: aString |
^ SeasidePlatformSupport base64Decode: (aString findTokens: ' ') last |
| setMethod: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict |
method _ methodString. url _ urlString. headers _ headDict. fields _ fieldDict. cookies _ cookieDict |
| testing |
|---|
| isGet |
^ self method asUppercase = 'GET' |
| as yet unclassified |
|---|
| method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict |
^ self new setMethod: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict |
| method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict nativeRequest: anObject |
^ (self method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict) nativeRequest: anObject; yourself |