headers:{
host: 'localhost:3000', connection: 'close', 'user-agent': 'Paw/3.1.8 (Macintosh; OS X/10.14.5) GCDHTTPRequest' }
This commit is contained in:
parent
9479429b8c
commit
245af79f31
|
@ -1,9 +1,10 @@
|
|||
import { Controller, Get, Req, Query } from '@nestjs/common';
|
||||
import { Controller, Get, Req, Query, Headers } from '@nestjs/common';
|
||||
|
||||
@Controller('posts')
|
||||
export class PostsController {
|
||||
@Get()
|
||||
index(@Query() query) {
|
||||
index(@Headers() headers, @Query() query) {
|
||||
console.log(headers)
|
||||
console.log(query)
|
||||
return [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue