lib/fog/aliyun/requests/compute/modify_vswitch.rb in fog-aliyun-0.3.19 vs lib/fog/aliyun/requests/compute/modify_vswitch.rb in fog-aliyun-0.4.0

- old
+ new

@@ -1,7 +1,9 @@ # frozen_string_literal: true +require 'addressable' + module Fog module Compute class Aliyun class Real # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/vswitch&modifyvswitchattribute] @@ -13,10 +15,10 @@ parameters = defaultParameters(action, sigNonce, time) pathUrl = defaultAliyunUri(action, sigNonce, time) parameters['VSwitchId'] = vSwitchId pathUrl += '&VSwitchId=' - pathUrl += URI.encode(vpcId, '/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') + pathUrl += Addressable::URI.encode_component(vpcId, Addressable::URI::CharacterClasses::UNRESERVED + '|') name = options[:name] desc = options[:description] if name parameters['VSwitchName'] = name