Inherits from NSObject
Declared in SPiDUtils.h
SPiDUtils.m

Overview

Helper functions for parsing and encoding URL:s

Tasks

Public methods

Class Methods

encodedHttpBodyForDictionary:

Encodes dictionary to a http post body

+ (NSString *)encodedHttpBodyForDictionary:(NSDictionary *)dictionary

Parameters

dictionary

The dictionary to be encoded

Return Value

The http post body

Declared In

SPiDUtils.h

encodedHttpQueryForDictionary:

Encodes dictionary to a http query

+ (NSString *)encodedHttpQueryForDictionary:(NSDictionary *)dictionary

Parameters

dictionary

The dictionary to be encoded

Return Value

The http query

Declared In

SPiDUtils.h

getUrlParameter:forKey:

Extracts a query parameter from a URL

+ (NSString *)getUrlParameter:(NSURL *)url forKey:(NSString *)key

Parameters

url

URL

key

Parameter to be found

Return Value

Value for the specified key otherwise nil

Declared In

SPiDUtils.h

urlEncodeString:

URL encodes the specified string

+ (NSURL *)urlEncodeString:(NSString *)unescaped

Parameters

unescaped

String to be encoded

Return Value

Encoded URL

Declared In

SPiDUtils.h

validateEmail:

Validates a email address

+ (BOOL)validateEmail:(NSString *)email

Parameters

email

The email to validate

Return Value

YES if the email is valid, otherwise NO

Discussion

Based on RFC 2822

Declared In

SPiDUtils.h