Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do basic authentication with RestClient?

Does anyone know how to do basic authentication with RestClient?

I need to create a private repository on GitHub through their RESTful API.

like image 620
never_had_a_name Avatar asked Sep 11 '10 20:09

never_had_a_name


People also ask

How do I enable basic authentication?

In Control Panel, click Programs and Features, and then click Turn Windows features on or off. Expand Internet Information Services, expand World Wide Web Services, expand Security, and then select Basic Authentication. Click OK. Click Close.

How do I get basic authentication on curl?

To send basic auth credentials with Curl, use the "-u login: password" command-line option. Curl automatically converts the login: password pair into a Base64-encoded string and adds the "Authorization: Basic [token]" header to the request.

How do I add basic auth to API?

OutSystems allows you to add basic authentication to the requests made to the REST APIs you are exposing. For that, do the following: In the Logic tab, open the Integrations folder. Select the exposed REST API you want to change and set its "Authentication" property to Basic .


1 Answers

The easiest way is to embed the details in the URL:

RestClient.get "http://username:[email protected]" 
like image 186
opsb Avatar answered Oct 11 '22 11:10

opsb