I have a GET request in my code that gets an mp3 file from google's text to speech API. the request goes something like this.
api/getlink?word=testing
But I want to have multiple arguments in this request. Like a speakingRate argument. I have tried
api/getlink?word=testing,speakingRate=0.5
and
api/getlink?word=testing&speakingRate=0.5
but neither seem to work. I'm missing the right formatting or is this method just restricted to a single argument?
Related
I am using the following Gmail API using the PHP Google API Client Library.
https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs/patch
This is my code that executes the call:
$signature = new Google_Service_Gmail_SendAs();
$signature->setSignature($this->signature);
$gmail->users_settings_sendAs->patch($this->email, $this->email, $signature);
I am passing a string value containing HTML code to update the signature.
When I update the signature using the above, it displays as plain text showing the HTML, as if it doesnt support HTML through the API method.
The API reference for the User.Settings.SendAs resource says the following about the signature parameter:
https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs#resource
signature string An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
So this seems to indicate that it supports HTML. We have tried VERY basic HTML like the following:
<em>Test</em>
It shows the above as is as plain text.
Can anyone help me to understand what are we doing wrong. We want to use this API to update the signature with HTML.
So we found the issue. Our controller was using htmlentities on the html String which is what was causing it to be treated as plain text.
Sorry it is difficult to provide code for this.
In a normal browser (firefox, IE etc) when I enter a Google Geo Code API URL
https://maps.googleapis.com/maps/api/geocode/xml?address=&key=
with myAddress and mykey set correctly. I get a the JSON response as text in the browser window.
I would like to do exactly the same with a VBNet browser control. That is-
Set aBrowser.Navigate property to my Google GeoCode API URL and then receive the JSON back as text in the browser that can be accessed with aBrowser.document.... .
However, VBnet seems to immediately abort the url navigation task and invites the user via a dialogue box to save a file. If I save the file and then inspect it, the content is the JSON text that I expected to see inside the browser document.
This is my first play with JSON and assumed that the VBNet browser would behave just like IE. I am missing something?
Thanks in advance.
Geoff
Had a play with the answer provided for for HTTP GET in VB.NET
This is easily adapted to work with Google GEO Code API and the JSON text is received into a string. I can then either process the string or place the string on the browser page.
This works for me.
I have a form getting parameters (method=GET, so the parameters are in the query string), and I have an Object with an embedded Google map. I want to make the embedded map dynamic, so that it will reflect the parameters (especially ll parameter for position). There are related questions with answers on how to do it with php and javascript, but is there any way to do it without scripting?
Is it possible in XHTML 1.0 Strict?
Plus, what should be the "target" syntax in the form? Neither "" nor the URL of current page does work, and different page just sends me away, which is not what I want.
When the form and the object(iframe with the map?) are located on the same page you may send the form directly to the iframe, in that case it would be possible to have a dynamic map without any scripting.
But however, when you use POST the parameters are not within the QUERY_STRING.
This is a rather simple question, but I cannot find documentation about it from Salesforce.
I am setting up an HTML Newsletter from Salesforce Vertical Response, and I need to put a link in the body of the email that goes to another site which takes the user's email address as a query string. I am doing this so that when the user clicks the link from the HTML email, they will automatically be signed up for a different blog mailing list.
The link will look like this www.mywebsite.com/blog/subscribe?email=your_email#email.com.
I can easily accomplish this by using the {EMAIL_ADDRESS} variable, such that the link looks like this:
Subsribe
This workds, but when the user gets the email and clicks the link, the '#' symbol gets stripped from the URL. Now I'm trying to figure out how to get around this. I saw some documentation on the URLENCODE() function for SalesForce, but when I try to use it in the HTML email editor in SalesForce, like URLENCODE({EMAIL_ADDRESS})it doesn't execute it, and instead interprets it literally as text. Can anyone help me? is it even possible to use functions from within the SalesForce HTML email editor?
Thanks
I havent used VerticalResponse, but if it leans on salesforce communication templates then you can always create an email template as Visualforce page. Then you can apply Encode functions to merge fields.
I'm glad you were able to find a workaround. If you ever go back to dealing with the URL, it's a good idea to disable our click-tracking when working with merge fields. This can be accomplished by adding nr_ before the http. Example: Subsribe - If you ever try that and it doesn't work, or if you have any other questions, please let us know via one of our Support channels:
support#verticalresponse.com
866-683-7842 x1
We also have live chat available: http://help.verticalresponse.com/
Regards,
Keith Gluck
VerticalResponse Customer Support
We have a web application that creates a web page. In one section of the page, a graph is diplayed. The graph is created by calling graphing program with an "img src=..." tag in the HTML body. The graphing program takes a number of arguments about the height, width, legends, etc., and the data to be graphed. The only way we have found so far to pass the arguments to the graphing program is to use the GET method. This works, but in some cases the size of the query string passed to the grapher is approaching the 2058 (or whatever) character limit for URLs in Internet Explorer. I've included an example of the tag below. If the length is too long, the query string is truncated and either the program bombs or even worse, displays a graph that is not correct (depending on where the truncation occurs).
The POST method with an auto submit does not work for our purposes, because we want the image inserted on the page where the grapher is invoked. We don't want the graph displayed on a separate web page, which is what the POST method does with the URL in the "action=" attribute.
Does anyone know a way around this problem, or do we just have to stick with the GET method and inform users to stay away from Internet Explorer when they're using our application?
Thanks!
One solution is to have the page put data into the session, then have the img generation script pull from that session information. For example page stores $_SESSION['tempdata12345'] and creates an img src="myimage.php?data=tempdata12345". Then myimage.php pulls from the session information.
One solution is to have the web application that generates the entire page to pre-emptively
call the actual graphing program with all the necessary parameters.
Perhaps store the generated image in a /tmp folder.
Then have the web application create the web page and send it to the browser with a "img src=..." tag that, instead of referring to the graphing program, refers to the pre-generated image.