Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 725 Bytes

GettingRawResponse.md

File metadata and controls

32 lines (24 loc) · 725 Bytes

Getting Raw Response

Steps for getting the raw response [i.e Response Object]

Initialize the Client

Refer this documentation for initializing the client.

Getting Raw Response by setting ResponseType

To get the raw response set the responseType of a request to ResponseType.RAW.

const rawResponse = await client
	.api("/me")
	.select("displayName")
	.responseType(ResponseType.RAW)
	.get();
console.log(rawResponse);

Using callback method,

client
	.api("/me")
	.select("displayName")
	.responseType(ResponseType.RAW)
	.get((error, rawResponse) => {
		console.log(rawResponse);
	});