- Preparing search index...
- The search index is not available
docs.hg.fi
Methods
deleteJson
- deleteJson(url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
Returns Promise<JsonAny>
deleteJsonEntity
- deleteJsonEntity(url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
deleteText
- deleteText(url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<string>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Returns Promise<string>
deleteTextEntity
- deleteTextEntity(url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
getJson
- getJson(url: string, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
getJsonEntity
- getJsonEntity(url: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
getText
- getText(url: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
getTextEntity
- getTextEntity(url: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
jsonRequest
- jsonRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<JsonAny>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
Returns Promise<JsonAny>
patchJson
- patchJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
patchJsonEntity
- patchJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
patchText
- patchText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
patchTextEntity
- patchTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
postJson
- postJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
postJsonEntity
- postJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
postText
- postText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
postTextEntity
- postTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
putJson
- putJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
putJsonEntity
- putJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
putText
- putText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
putTextEntity
- putTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
textEntityRequest
- textEntityRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<ResponseEntity<string>>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
textRequest
- textRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<string>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Returns Promise<string>
Static
Private
_createClientError
- _createClientError(): TypeError
Private
Returns TypeError
Static
deleteJson
- deleteJson(url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
Returns Promise<JsonAny>
Static
deleteJsonEntity
- deleteJsonEntity(url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
Static
deleteText
- deleteText(url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<string>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Returns Promise<string>
Static
deleteTextEntity
- deleteTextEntity(url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Static
getJson
- getJson(url: string, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
Static
getJsonEntity
- getJsonEntity(url: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Static
getText
- getText(url: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
Static
getTextEntity
- getTextEntity(url: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
headers: {
[key: string]: string;
}
Static
jsonRequest
- jsonRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: JsonAny): Promise<JsonAny>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: JsonAny
Returns Promise<JsonAny>
Static
patchJson
- patchJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
Static
patchJsonEntity
- patchJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Static
patchText
- patchText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
Static
patchTextEntity
- patchTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Static
postJson
- postJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
Static
postJsonEntity
- postJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Static
postText
- postText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
Static
postTextEntity
- postTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Static
putJson
- putJson(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<JsonAny>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<JsonAny>
Static
putJsonEntity
- putJsonEntity(url: string, data?: JsonAny, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<JsonAny>>
-
Parameters
-
url: string
-
Optional
data: JsonAny
-
Optional
headers: {
[key: string]: string;
}
Static
putText
- putText(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<string>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Returns Promise<string>
Static
putTextEntity
- putTextEntity(url: string, data?: string, headers?: {
[key: string]: string;
}): Promise<ResponseEntity<string>>
-
Parameters
-
url: string
-
Optional
data: string
-
Optional
headers: {
[key: string]: string;
}
Static
setLogLevel
- setLogLevel(level: LogLevel): void
-
Returns void
Static
textEntityRequest
- textEntityRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<ResponseEntity<string>>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Static
textRequest
- textRequest(method: RequestMethod, url: string, headers?: {
[key: string]: string;
}, data?: string): Promise<string>
-
Parameters
-
-
url: string
-
Optional
headers: {
[key: string]: string;
}
-
Optional
data: string
Returns Promise<string>
Before using static methods of this library the implementation must be defined and selected using
RequestClient.useClient()
.HgNode.initialize()
which callsuseClient()
for NodeJS projectsHgFrontend.initialize()
which callsuseClient()
for frontend projectsYou may also use it as a standard class:
`const client = new RequestClient( clientImplementation );