C
C#6mo ago
KRAYTONIAN

I need help refactoring my http request

I want to be able to call the function anywhere. I would like to seperate services. I dont like how I am using services to make an http call.
Code is in file
Code is in file
8 Replies
blueberriesiftheywerecats
you can just inject that service and use that method anywhere
SleepWellPupper
SleepWellPupper6mo ago
Can you use $paste so mobile may view your code more easily?
MODiX
MODiX6mo ago
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
KRAYTONIAN
KRAYTONIANOP6mo ago
BlazeBin - unolvxlretmv
A tool for sharing your source code with the world!
SleepWellPupper
SleepWellPupper6mo ago
I agree with https://discord.com/channels/143867839282020352/1257776569309466755/1257804863442522162 Create a service for your functionality, register to DI and inject where needed
MODiX
MODiX6mo ago
blueberriesiftheywerecats
you can just inject that service and use that method anywhere
Quoted by
React with ❌ to remove this embed.
SleepWellPupper
SleepWellPupper6mo ago
What issue do you see with making http requests via a service?
Want results from more Discord servers?
Add your server