Let's say I want to use Ruby's HTTPI library to send a GET request to the following URL:
url = 'https://mywebsite.com/path to resource'request = HTTPI::Request.new(url)return HTTPI.get(request)
Will this work, or do I need to manually URL-encode my URL first? Something like
Follow-up question: If the answer to the above question is that this would work automatically without having to manually URL-encode the URL, then what would happen if I did manually URL-encode it before passing it to the Request? Would it then fail? Or what if I partially URL-encoded it but didn't URL-encode all of it?
I am adding a hyperlink with the following code:
Dim HyperlinksAdd as StringHyperlinksAdd = "[MyWorkBook.xlsm]thissheet!C1"ActiveWorkbook.Worksheets("linksheet").Hyperlinks.Add Anchor:=ActiveWorkbook.Worksheets("linksheet").Cells(3, 3), _ Address:=HyperlinksAdd, _TextToDisplay:="Link to thissheet cell c1"
When I run the code the hyperlink is created however the address is urlencoded as follow --obtained from when I right click on the link and select properties.
Address is %5bMyWorkBook.xlsm%5dthissheet!C1
notice the [ is changed to %5b and ] is changed to %5d
any ideas on why this is happening?
Is there a way to use
http_build_query() without having it URL encode according to some RFC standard?
Why I don't want to URL encode everything: I'm querying the Ebay API.. They honestly insist on parameter names not being URL encoded, as far as commas in parentheses. E.g. DomainName(0) is a parameter, and the query fails if those parens are encoded.
Just like in Python you have
urllib.urlencode(), which takes in a dictionary (or list of two tuples) and creates a string like
I want to make an HTTP request using some data I previously encoded, but when I send the encoded string, the
. (dot) gets decoded.
so the actual call which is being made:
'.' to be sent as
%2E. What could I do?