Forum Discussion

kmrizwanshahid's avatar
kmrizwanshahid
New Contributor
6 years ago

Consume swaggerhub published API into the C# solution

I have created an API using swaggerhub and publish as well. I want to share my published API with another developer to consume into c# and continue his work but unfortunately unable to access my GET, POST, PUT methods. 

 

Published API URL: https://app.swaggerhub.com/apis/Eworx/ManageCustomer/1.0.0

 

I want to hit GET method directly. Can I do that?

1 Reply

  • Hi,

     

    You can use CURL to send a request to your GET method or any of your methods outside of Swaggerhub.  Using the Try it Out functionality will generate a CURL command to use.

     

    curl -X GET "https://virtserver.swaggerhub.com/Eworx/ManageCustomer/1.0.0/Cus" -H "accept: application/json"

    You can download curl from the link below.

     

    https://curl.haxx.se/download.html

     

    If you would like to use C# then use the codegen -> Client -> csharp to generate client code to make requests to your API.

     

    Regards,

    Marcus

    SmartBear Support