You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sure it happens on many developers (specially when they are trying for the first time this framework) that some signal properties have the same name for request and response.. i would suggest to change the names of these properties like this
For Request:
$.header() => $.getHeader()
$.headers() => $.getHeaders()
for Response:
$.header() => $.setHeader() //Specially this property cause it's also available for request
$.headers() => $.setHeaders() //I thought on this one to just pass an object as parameter
The text was updated successfully, but these errors were encountered:
nope we should make it the following if it is not this way at present:
We use so called lazzy setter getters that means;
$.headers() -> returns the headers its a getter
$.headers('headname') -> returns the single header its a getter
$.headers([headname1,headname2]) -> returns the 2 headers its a getter it got a single arrgument array could be also single arrgument object.
$.headers('headername', value) -> will set the headername to value same with arrays and objects sorry i dont write whole documentation here.
- Introducing signal.setHeader(key, value) to set a response header #61
- Introducing signal.getHeader(key) to return a response header #61
- Introducing signal.getRequestHeader(key) to return a request header
#61
- Introducing signal.error(key) to return an error with a key #61
- Introducing signal.sendFile(path) to end a response with a file #69
- Introducing $.error('message') and $.error('stack') to allow better
Error Exceptions handling with app.error(callback)
- Added example for signal.error
- Added example for signal.sendFile
@Nosthertus As of v0.12.0 you can use $.getHeader(key), $.setHeader(key, value) to return response headers and $.getRequestHeader(key) to return request headers.
As far as I know you cannot SET request headers because they come from the client.
Also you could and still can access all request headers with the $.headers object.
I am sure it happens on many developers (specially when they are trying for the first time this framework) that some signal properties have the same name for request and response.. i would suggest to change the names of these properties like this
The text was updated successfully, but these errors were encountered: