Topics

Set custom headers and cookies

Rafael Righes <righes.testing@...>
 

Hello,

I'm trying to set a custom header which has a value such as "X-Auth-Token_SUFFIX". Same value can be used as a cookie name.

I'm having a hard time to accomplish this using rest-client using the API and something like:

RestClient::Request.execute( :method => :put, :url => "#{@base_uri}/v2/authn/tokens/refresh", :headers => { :accept => "x-auth-token/cookie" }, :cookies => { "X-Auth-Token_SUFFIX" => <here_goes_token_contents> } )

Any help would be appreciated!

Regards,
Rafael Righes