brunodavi / brunodavi/http-script

Add lifecycle between request and response to use `.js`

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
JavaScript
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Reimplement .js in 2 cases

- `.request` (write .js before response)
- `.response` (renamed .js)

**Example**
```js
httpScript(
`
g :1234

.request
// Only this works here
console.log(this)
this.state.mydata = {}
.

.response
console.log(response)
this.state.mydata.title = response.title
.
`
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.