I want to consume my api. it is in go lang. i use axios in front (react) for consume it
my route:
localhost:1323/profile/email/:email/password/:password
i don't know how i can pass the email and password in axios request with get.
my code:
import axios from 'axios'
export async function validLogin(email, password) {
const valid = await axios.get('localhost:1323/profile/email/'+ email + '/password/'+ password).then((response) => {
return response;
});
return valid
}
I tried to use http://localhost instead localhost pure, but don't work too.