logo
search icon
Close
FrameworkLibrariesCommunityDocumentation
Chapters
Questions & Answers

How can I return HTML responses?

Deepkit HTTP
Warning: The answer is generated by an artificial intelligence. It might not be correct.
To adjust rating, open the thread in Discord and click on the up/down vote button.

To return HTML responses, you can use the HtmlResponse class or simply return a string of HTML content.

Using the HtmlResponse class:

import { HtmlResponse } from '@deepkit/http';

router.get('/', () => {
  return new HtmlResponse('<h1>Hello World</h1>');
});
IntroductionExamplesJoin Discord
App
Getting startedExamplesArguments & FlagsDependency InjectionModulesServicesEventsLoggerConfiguration
Framework
Getting startedExamplesDatabaseTestingDeploymentPublic Assets
Runtime Types
IntroductionGetting startedExamplesType AnnotationsReflectionSerializationValidationExtendCustom serializerExternal TypesBytecode
Dependency Injection
IntroductionGetting startedExamplesProvidersInjectionConfigurationScopes
Filesystem
Getting startedExamplesAppLocalMemoryAWS S3FTPsFTP (SSH)Google Storage
Broker
Getting startedCacheMessage BusMessage QueueAtomic LocksKey Value
HTTP
IntroductionGetting startedExamplesInput & OutputViewsDependency InjectionEventsMiddlewareSecurity
RPC
IntroductionGetting startedExamplesDependency InjectionSecurityErrorsTransport
Database ORM
IntroductionGetting startedExamplesEntitySessionQueryTransactionInheritanceRelationsEventsMigrationsORM BrowserRaw AccessSeedingComposite primary key
Plugins
Soft-Delete