Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Didnt find my baseURL #2

Closed
HaxSam opened this issue Aug 20, 2020 · 2 comments · Fixed by #14
Closed

Didnt find my baseURL #2

HaxSam opened this issue Aug 20, 2020 · 2 comments · Fixed by #14

Comments

@HaxSam
Copy link

HaxSam commented Aug 20, 2020

I used axiod.create with a baseURL but i got the error "error: Uncaught URIError: relative URL without a base"
The fuction dont use my baseURL

@roonie007
Copy link
Owner

@HaxSam can you share your code ?

@HaxSam
Copy link
Author

HaxSam commented Aug 24, 2020

const discord = axiod.create({
baseURL: "https://discordapp.com/api/v6",
timeout: 5000,
headers: {
Authorization: token,
accept: "/",
authority: "discordapp.com",
"content-type": "application/json",
},
});

await discord.post(
"/channels/{channel:id}/messages",
{ content: "Hey!" },
);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants