Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Features #22

Closed
6 tasks done
r17x opened this issue Oct 2, 2022 · 5 comments
Closed
6 tasks done

New Features #22

r17x opened this issue Oct 2, 2022 · 5 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@r17x
Copy link
Owner

r17x commented Oct 2, 2022

New Features

Hacktoberfest has arrived

At this project we want to deliver new feature, the new feature is based on fetch specification at whatwag - See here

image

Example Usage

import { fetchText, fetchJson, fetchBlob, fetchArrayBuffer, fetchFormData } from 'fetch.macro'

const fetchSomeText = fetchText`/api/v1/user/:id/project/:projectId/:others`;

const fetchSomeJson = fetchJson`/api/v1/user/:id/project/:projectId/:others`;

const fetchSomeBlob = fetchBlob`/api/v1/user/:id/project/:projectId/:others`;

const fetchSomeArrayBuffer = fetchArrayBuffer`/api/v1/user/:id/project/:projectId/:others`;

const fetchSomeFormData = fetchFormData`/api/v1/user/:id/project/:projectId/:others`;

Todo

This is lists for new API at fetch.macro modules.

Before start the contrbution, we have been provide code flag for make our easy to write code implementation or test case.

This the line of code related with this issue and step to contributed:

  1. Write Reference name - reference name is import module name (e.g: fetchText) - See Here
  2. Write Member Expression implementation - (e.g: .then(r => r.json)) - See Here
  3. Apply transformation - See here
  4. Write little documentation at README.md - Example: fetchText (Skip this step, go to step 5., write documentation about api in test case)
  5. Write Test Case in fetch.test.js - See here

Thanks for you contribution and happy hacking

@r17x r17x added enhancement New feature or request hacktoberfest labels Oct 2, 2022
@r17x r17x pinned this issue Oct 2, 2022
kodiakhq bot pushed a commit that referenced this issue Oct 3, 2022
github-actions bot pushed a commit that referenced this issue Oct 3, 2022
# [1.4.0](v1.3.0...v1.4.0) (2022-10-03)

### Features

* **fetchBlob:** add fetchBlob API for produce fetch for blob response ([#28](#28)) ([962ed11](962ed11)), closes [#22](#22)
kodiakhq bot pushed a commit that referenced this issue Oct 4, 2022
github-actions bot pushed a commit that referenced this issue Oct 4, 2022
# [1.5.0](v1.4.0...v1.5.0) (2022-10-04)

### Features

* **fetchFormData:** add fetchFormData API for produce fetch for formData response ([#31](#31)) ([08a8303](08a8303)), closes [#22](#22)
kodiakhq bot pushed a commit that referenced this issue Oct 4, 2022
…r arrayBuffer response (#34)

#22 for `fetchArrayBuffer`
github-actions bot pushed a commit that referenced this issue Oct 4, 2022
# [1.6.0](v1.5.0...v1.6.0) (2022-10-04)

### Features

* **fetchArrayBuffer:** add fetchArrayBuffer API for produce fetch for arrayBuffer response ([#34](#34)) ([1136e05](1136e05)), closes [#22](#22)
@r17x
Copy link
Owner Author

r17x commented Oct 4, 2022

If you have some idea, feel free for put your approach here!

Thanks

@fzn0x
Copy link

fzn0x commented Oct 4, 2022

There is also one more feature called Response.clone MDN Maybe it's nice to have it here :))

@r17x
Copy link
Owner Author

r17x commented Oct 4, 2022

Thanks good for me but we need to make the constructor Request before make a part of it. Could you elaborate more about Request.clone idea?
@fzn0x

Hm did you mean Response.clone ? @fzn0x

https://developer.mozilla.org/en-US/docs/Web/API/Response/clone

If you want to take this, just go to open PRs 😊

@fzn0x
Copy link

fzn0x commented Oct 4, 2022

Thanks good for me but we need to make the constructor Request before make a part of it. Could you elaborate more about Request.clone idea? @fzn0x

Hm did you mean Response.clone ? @fzn0x

https://developer.mozilla.org/en-US/docs/Web/API/Response/clone

If you want to take this, just go to open PRs 😊

Yup Response.clone sorry for the typo haha, uhh sweet if I find a good time I will try to open a PR :D

@r17x
Copy link
Owner Author

r17x commented Oct 4, 2022

@fzn0x I have been updated this issue. Nope, I think Response.clone is low priority and you can take this for new feature.

Anyway take your time!

kodiakhq bot pushed a commit that referenced this issue Oct 9, 2022
github-actions bot pushed a commit that referenced this issue Oct 9, 2022
# [1.7.0](v1.6.1...v1.7.0) (2022-10-09)

### Features

* **fetchClone:** add fetchClone API for produce fetch for cloned response ([#38](#38)) ([d88c4f7](d88c4f7)), closes [#22](#22)
@r17x r17x closed this as completed Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants