Module: JenkinsApi::UriHelper
- Included in:
- Client::Job, Client::Node, Client::User, Client::View
- Defined in:
- lib/jenkins_api_client/urihelper.rb
Instance Method Summary (collapse)
-
- (Object) form_encode(string)
Encode a string for using in the query part of an URL.
-
- (Object) path_encode(path)
Encode a string for use in the hiearchical part of an URL.
Instance Method Details
- (Object) form_encode(string)
Encode a string for using in the query part of an URL
7 8 9 |
# File 'lib/jenkins_api_client/urihelper.rb', line 7 def form_encode(string) URI.encode_www_form_component string.encode(Encoding::UTF_8) end |
- (Object) path_encode(path)
Encode a string for use in the hiearchical part of an URL
13 14 15 |
# File 'lib/jenkins_api_client/urihelper.rb', line 13 def path_encode(path) URI.escape(path.encode(Encoding::UTF_8)) end |