URL Utilities

Introduction

This header contains function prototypes that aid in parsing URLs.



Functions

URLParseComponents

Parses an absolute or relative URL into the general components supported by all URI's.


URLParseComponents


Parses an absolute or relative URL into the general components supported by all URI's.

OSStatus URLParseComponents(
    const char *inSrc,
    const char *inEnd,
    URLComponents *outComponents,
    const char **outSrc );  

See Also

URLComponents


Typedefs

URLComponents

Parses an absolute or relative URL into the general components supported by all URI's.


URLComponents


Parses an absolute or relative URL into the general components supported by all URI's.

typedef struct { 
    const char *schemePtr; 
    size_t schemeLen; 
    const char *userPtr; 
    size_t userLen; 
    const char *passwordPtr; 
    size_t passwordLen; 
    const char *hostPtr; 
    size_t hostLen; 
    const char *pathPtr; 
    size_t pathLen; 
    const char *queryPtr; 
    size_t queryLen; 
    const char *fragmentPtr; 
    size_t fragmentLen;  
    const char *segmentPtr; // Ptr to the current resource path segment. Leading slash is removed, if present. 
    const char *segmentEnd; // End of the resource path segments. Trailing slash is removed, if present.  
} URLComponents;  

See Also

URLParseComponents