Module yaws_arg

This module provides functions for getting and setting values of a Yaws 'arg' record.

Copyright © Yariv Sadan 2006-2007

Authors: Yariv Sadan (yarivsblog@gmail.com) [web site: http://yarivsblog.com].

Description

This module provides functions for getting and setting values of a Yaws 'arg' record. You can use these functions instead of using the record access syntax, and without having to include yaws_api.hrl.

Most functions have two forms: one for getting the value of a field and one for setting it. Getters accept the record as a parameter and return the value of its field. Setters take two parameters -- the record and the new value -- and return a new record with the modified value.

Function Index

add_all_to_opaque/2applies add_to_opaque for all values in the list.
add_to_opaque/2Equivalent to Arg#arg{opaque = [Val | A#arg.opaque]}.
appmod_prepath/1
appmod_prepath/2
appmoddata/1
appmoddata/2
clidata/1
clidata/2
client_ip_port/1
client_ip_port/2
clisock/1
clisock/2
cont/1
cont/2
docroot/1
docroot/2
fullpath/1
fullpath/2
get_opaque_val/2Return the value corrsponding to the Key in the opaque proplist.
headers/1
headers/2
method/1
new/0Create a new 'arg' record.
opaque/1
opaque/2
pathinfo/1
pathinfo/2
pid/1
pid/2
querydata/1
querydata/2
req/1
req/2
server_path/1
server_path/2
state/1
state/2

Function Details

add_all_to_opaque/2

add_all_to_opaque(A::arg(), Vals::[term()]) -> arg()

applies add_to_opaque for all values in the list

add_to_opaque/2

add_to_opaque(Arg, Val) -> term()

Equivalent to Arg#arg{opaque = [Val | A#arg.opaque]}.

appmod_prepath/1

appmod_prepath(Arg) -> term()

appmod_prepath/2

appmod_prepath(Arg, Val) -> term()

appmoddata/1

appmoddata(Arg) -> term()

appmoddata/2

appmoddata(Arg, Val) -> term()

clidata/1

clidata(Arg) -> term()

clidata/2

clidata(Arg, Val) -> term()

client_ip_port/1

client_ip_port(Arg) -> term()

client_ip_port/2

client_ip_port(Arg, Val) -> term()

clisock/1

clisock(Arg) -> term()

clisock/2

clisock(Arg, Val) -> term()

cont/1

cont(Arg) -> term()

cont/2

cont(Arg, Val) -> term()

docroot/1

docroot(Arg) -> term()

docroot/2

docroot(Arg, Val) -> term()

fullpath/1

fullpath(Arg) -> term()

fullpath/2

fullpath(Arg, Val) -> term()

get_opaque_val/2

get_opaque_val(A::arg(), Key::term()) -> term() | undefined

Return the value corrsponding to the Key in the opaque proplist. If the key isn't found, return 'undefined'.

headers/1

headers(Arg) -> term()

headers/2

headers(Arg, Val) -> term()

method/1

method(Arg) -> term()

new/0

new() -> term()

Create a new 'arg' record.

opaque/1

opaque(Arg) -> term()

opaque/2

opaque(Arg, Val) -> term()

pathinfo/1

pathinfo(Arg) -> term()

pathinfo/2

pathinfo(Arg, Val) -> term()

pid/1

pid(Arg) -> term()

pid/2

pid(Arg, Val) -> term()

querydata/1

querydata(Arg) -> term()

querydata/2

querydata(Arg, Val) -> term()

req/1

req(Arg) -> term()

req/2

req(Arg, Val) -> term()

server_path/1

server_path(Arg) -> term()

server_path/2

server_path(Arg, Val) -> term()

state/1

state(Arg) -> term()

state/2

state(Arg, Val) -> term()