Browse Source

test in localhost request

amenpunk 3 years ago
parent
commit
03f2435698
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/Pages/Login.jsx
  2. 2 1
      src/Utils/HTTP.js

+ 1 - 1
src/Pages/Login.jsx

50
             console.log(email,password);
50
             console.log(email,password);
51
             // let request = new HTTP('/user?' + `user=${email}&password=${password}`)
51
             // let request = new HTTP('/user?' + `user=${email}&password=${password}`)
52
             let request = new HTTP()
52
             let request = new HTTP()
53
-            request.post()
53
+            request.get_()
54
             // toast.success('Bienvenido!!')
54
             // toast.success('Bienvenido!!')
55
             // toast.error("This didn't work.")
55
             // toast.error("This didn't work.")
56
             // return navigate('/dashboard/home')
56
             // return navigate('/dashboard/home')

+ 2 - 1
src/Utils/HTTP.js

6
     constructor(url){
6
     constructor(url){
7
         this.base_url = 'http://204.48.25.93:8081/users'; 
7
         this.base_url = 'http://204.48.25.93:8081/users'; 
8
         this.url =  this.base_url + url
8
         this.url =  this.base_url + url
9
-        this.api =  'http://204.48.25.93:8081/user?user=patrik&password=12345'
9
+        // this.api =  'http://204.48.25.93:8081/user?user=patrik&password=12345'
10
+        this.api =  'http://localhost:8081/user?user=patrik&password=12345'
10
     }
11
     }
11
 
12
 
12
     async post(){
13
     async post(){