I am trying to create a function with net/http for below curl commands
curl -H 'Authorization: Bearer OAuth2-token' https://stage.api.example.com/ssoclient/users/v1/domain_client curl -H 'content-type: application/JSON' -d @example.JSON OAuth2-url
I am able to create a function using rest-client like below RestClient.get 'OAuth2-url', {'Authorization' => 'Bearer OAuth2-auth'}
I get the expected JSON object when i use rest-client, how can i achieve the same with net/http.
Thanks,