RequestDto
Describes one outbound HTTP request. You don't usually instantiate it directly: you call application.getRequestDto(...) which returns a RequestDto with the right auth headers attached.
import RequestDto from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto';
Constructor #
new RequestDto(
url: string,
method: HttpMethods,
debugInfo: ProcessDto,
body?: string,
headers?: Record<string, string>,
)
Methods provided #
| Method | Returns | Purpose |
|---|---|---|
getUrl() / setUrl(url) | string / this | Target URL. |
getMethod() / setMethod(m) | HttpMethods / this | HTTP method. |
getHeaders() / setHeaders(h) | Record<string,string> / this | Request headers. |
getBody() / setBody(b) | string / this | Raw request body. |
getDebugInfo() | ProcessDto | Process context, used by transport for correlation/logging. |
See also #
- AApplication — produces
RequestDtoinstances. - AConnector — sends them.
- PHP equivalent: PHP folds the request descriptor into the connector itself; see
ConnectorAbstract.