Skip to content

Commit

Permalink
update changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jd1378 committed Feb 11, 2021
1 parent db40a5a commit 2942d00
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@

# Changelog

# v2.1.0
## v3.0.0

- BREAKING CHANGE: Changed `form` option to `formData` and used `form` option as a `application/x-www-form-urlencoded` value instead of `multipart/form-data`.
this means anything meant to be sent as a `multipart/form-data` now should be passed as `formData` option.

## v2.1.0

- Allow array of strings as value in form option.

# v2.0.0
## v2.0.0

- BREAKING CHANGE: rename `fetchFn` to `fetch` in WrapFetchOptions
- create WrapFetchOptions type
- add a validator option to WrapFetchOptions
- the validator that is passed to WrapFetchOptions will run before the validator of ExtendedRequestInit

# v1.5.0
## v1.5.0

- pass init to validator

# v1.4.0
## v1.4.0

- add validator option
- update docs a bit

# v1.3.3
## v1.3.3

- fix bug introduced in last version and add test

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Also adds `Accept` header with value `application/json, text/plain, */*` if not
you can import `wrapFetch` from `mod.ts` file.

```js
export { wrapFetch } from 'https://deno.land/x/fetch_goody@v2.1.0/mod.ts';
export { wrapFetch } from 'https://deno.land/x/fetch_goody@v3.0.0/mod.ts';
```

### wrapFetch
Expand All @@ -29,12 +29,14 @@ const wrappedfetch = wrapFetch({ fetchFn: yourFetch });
#### using the new wrappedfetch

```js

// v3.0.0 : for sending a multipart/form-data body now you should use `formData`.
const resp1 = await wrappedfetch("url",{
form: {
'foo': 'bar'
}
}); // sets method to POST by default and converts object to FormData.
}); // sets method to POST by default and converts object to application/x-www-form-urlencoded.



// or

Expand Down

0 comments on commit 2942d00

Please sign in to comment.