link-lib
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Request
Init
Generator
constructor
base
Headers
credentials
csrf
Field
Name
mode
x
Requested
With
authenticity
Header
generate
Hierarchy
RequestInitGenerator
Index
Constructors
constructor
Properties
base
Headers
credentials
csrf
Field
Name
mode
x
Requested
With
Methods
authenticity
Header
generate
Constructors
constructor
new
Request
Init
Generator
(
opts
?:
RequestInitGeneratorOpts
)
:
RequestInitGenerator
Parameters
Default value
opts:
RequestInitGeneratorOpts
= {credentials: "include",csrfFieldName: "csrf-token",mode: "same-origin",xRequestedWith: "XMLHttpRequest",}
Returns
RequestInitGenerator
Properties
base
Headers
base
Headers
:
{}
Type declaration
[
k:
string
]:
string
credentials
credentials
:
"include"
|
"same-origin"
|
"omit"
|
undefined
csrf
Field
Name
csrf
Field
Name
:
string
mode
mode
:
"same-origin"
|
"navigate"
|
"no-cors"
|
"cors"
|
undefined
x
Requested
With
x
Requested
With
:
string
Methods
authenticity
Header
authenticity
Header
(
options
?:
{}
)
:
Record
<
string
,
string
>
Parameters
Default value
options:
{}
= {}
Returns
Record
<
string
,
string
>
generate
generate
(
method
?:
string
, accept
?:
string
, body
?:
BodyInit
|
null
)
:
RequestInit
Parameters
Default value
method:
string
= "GET"
Default value
accept:
string
= "text/turtle"
Optional
body:
BodyInit
|
null
Returns
RequestInit
Generated using
TypeDoc