Getting bearer token via Refit

-- -- 937 Reputation points
2022-02-01T15:16:18.513+00:00

Hi

I have an API that takes a username and password and then returns a bearer token. The curl code is below at the end.

How can I make the call to get the token via Refit?

Many thanks

Regards

curl -X 'POST' \
  'http://localhost:65202/api/Authentication/Authenticate' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json;odata.metadata=minimal;odata.streaming=true' \
  -d '{ "userName": "Admin", "password": "" }'
Windows development | Windows API - Win32
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

1 answer

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.