import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.curl('id', { url: 'url' });
console.log(response.body);{
"status": 123,
"headers": {},
"body": "<string>",
"duration_ms": 123
}Sends an HTTP request through Chrome’s HTTP request stack, inheriting the browser’s TLS fingerprint, cookies, proxy configuration, and headers. Returns a structured JSON response with status, headers, body, and timing.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.curl('id', { url: 'url' });
console.log(response.body);{
"status": 123,
"headers": {},
"body": "<string>",
"duration_ms": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Browser session ID
Request to make an HTTP request through the browser's network stack.
Target URL (must be http or https).
HTTP method.
GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS Custom headers merged with browser defaults.
Show child attributes
Request body (for POST/PUT/PATCH).
Request timeout in milliseconds.
1000 <= x <= 60000Encoding for the response body. Use base64 for binary content.
utf8, base64 Response from target URL
Structured response from the browser curl request.