Up
Authors
- Richard Frith-Macdonald (
rfm@gnu.org)
-
Date: Generated at 2025-12-03
Copyright: (C) 2025 Free Software Foundation, Inc.
- Declared in:
- GNUstepBase/GSURITemplate.h
Availability: Not in OpenStep/MacOS-X
Class for parsing and expanding URL
templates acording to the RFC6570 specification
(see https://tools.ietf.org/html/rfc6570). eg. template
= [GSURITemplate templateWithString:
@"/search{?q}"
relativeToURL: aURL error: &error];
GSURITemplate declares 3 Instance Variables
+ (instancetype)
templateWithString: (
NSString*)aPattern
error: (
NSError**)error;
Availability: Not in OpenStep/MacOS-X
Creates and returns an instance initialized with
the given pattern.
The pattern may be either an
absolute template or a relative template.
- (
NSURL*)
URLWithVariables: (
NSDictionary*)variables
relativeToURL: (
NSURL*)baseURL
error: (
NSError**)error;
Availability: Not in OpenStep/MacOS-X
Expands the template with the given
variables and reurns a new URL relative to
the given base URL or, if that is nil,
relative to the absolute part of the pattern with
which the template was created.
In the absence
of any absolute part, this method returns a relative
URL.
- (
NSString*)
pattern;
Availability: Not in OpenStep/MacOS-X
The URI template pattern used to initialize the
receiver.
- (
NSString*)
relativeStringWithVariables: (
NSDictionary*)variables
error: (
NSError**)error;
Availability: Not in OpenStep/MacOS-X
Expands the receiver with the specified
variables, returning the relative part of
the result.
Returns nil if the
template cannot be expanded with the
variables.
Instance Variables for GSURITemplate Class
@protected NSURL*
base;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
@protected NSString*
pattern;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
@protected NSMutableArray*
terms;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Up