Skip to content

Commit efe33f3

Browse files
committed
Update docs to match the new package name
1 parent 1e1163b commit efe33f3

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Marcelo Lauxen
3+
Copyright (c) 2021 Basecamp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Rails Fetch
1+
# Request.JS
22

3-
Rails Fetch encapsulates the logic to send by default some headers that are required by rails applications like the `X-CSRF-Token`.
3+
Request.JS encapsulates the logic to send by default some headers that are required by rails applications like the `X-CSRF-Token`.
44

55
# Install
66

77
### npm
88
```
9-
npm i rails-fetch
9+
npm i @rails/request.js
1010
```
1111
### yarn
1212
```shell
13-
yarn add rails-fetch
13+
yarn add @rails/request.js
1414
```
1515

1616
# How to use
@@ -20,12 +20,12 @@ Just import the `Request` class from the package and instantiate it passing the
2020
Example:
2121

2222
```js
23-
import { Request } from 'rails-fetch'
23+
import { Request } from '@rails/request.js'
2424

2525
....
2626

2727
async myMethod () {
28-
const request = new Request('post', 'localhost:3000/my_endpoint', { body: { name: 'Rails Fetch' }})
28+
const request = new Request('post', 'localhost:3000/my_endpoint', { body: { name: 'Request.JS' }})
2929
const response = await request.perform()
3030
if (response.ok) {
3131
const body = await response.text
@@ -35,10 +35,8 @@ async myMethod () {
3535
}
3636
```
3737

38-
# Credits
39-
40-
[Basecamp](https://github.com/basecamp), since this piece of code has been extracted from hey.com.
41-
4238
# License
4339

44-
Rails Fetch is released under the [MIT License](LICENSE).
40+
Request.JS is released under the [MIT License](LICENSE).
41+
42+
© 2021 Basecamp, LLC.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "rails-fetch",
2+
"name": "@rails/request.js",
33
"version": "0.0.2",
44
"description": "A tiny Fetch API wrapper that allows you to make http requests without need to handle to send the CSRF Token on every request",
55
"main": "./src/index.js",
66
"module": "./src/index.js",
7-
"repository": "https://github.com/marcelolx/rails-fetch.git",
7+
"repository": "https://github.com/rails/request.js",
88
"author": "Marcelo Lauxen <marcelolauxen16@gmail.com>",
99
"license": "MIT",
1010
"private": false,
@@ -15,7 +15,7 @@
1515
"fetch api"
1616
],
1717
"bugs": {
18-
"url": "https://github.com/marcelolx/rails-fetch/issues"
18+
"url": "https://github.com/rails/request.js"
1919
},
2020
"scripts": {
2121
"lint": "standard src"

0 commit comments

Comments
 (0)