Module "wordpress-packages/utils/lib/factory/ajax/parseResult"
Functions
parseResult
- parseResult<TResponse>(url: string, result: Response, method?: ERouteHttpVerb): Promise<TResponse>
-
Type parameters
Parameters
-
url: string
-
result: Response
-
Returns Promise<TResponse>
Get the result of the
Response
. It also handles multiline responses, e. g. a PHPNotice:
message is output through a conflicting plugin:If you are using a verb like
DELETE
orPUT
the response may be empty and this function will returnundefined
.https://developer.mozilla.org/de/docs/Web/HTTP/Methods/DELETE