Open Closed

Calling external REST API using ABP.IO #916


User avatar
0
aidid created

Hi there,

So while I'm browsing upon abp.io docs, I'm stumbled upon Dynamic C# API Client Proxies and came up with a few question regarding it possible use case scenario.

  1. Would it be possible to use this dynamic C# API Client Proxies to call external REST API?
  2. How does the Dynamic C# API Client Proxies handle storing authentication token if it is capeable of calling external REST API?

Thank you in advanced :)

  • ABP Framework version: v4.2.1
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    Moyaoxiang created

    Hi aidid, It is not recommended to directly use the ABP vNext dynamic proxy API function to call external APIs. If you want to achieve a similar function, you can try https://github.com/reactiveui/refit

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aidid created

    Hi,

    Thanks for the suggestion and it appears to be great :). Just another question thought, Is it better to use a domain service to call the rest api or create a singleton instead?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Moyaoxiang created

    HI aidid, It depends on the role of the external API. If it is part of a business operation, it can be placed in the Domain Service.Due to the unreliability of the network, you may need to combine (Polly) to implement some strategies.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.