Elasticsearch URL problems - url

I am trying to return more values using elastic search and i am getting an error with this url.
The error just says error the URL i am trying to post to is:
http:/someserver.com/elasticSearch/media/_search?q=bowls-d{'from' : 0, 'size' : 100}
I am not sure what is wrong with the URL this, URL does work but i only get the default 10 hits back:
http:/someserver.com/elasticSearch/media/_search?q=bowls
Any ideas?

Try this:
http:/someserver.com/elasticSearch/media/_search?q=bowls&from=0&size=100

Related

Syntax error at position 57 in 'TimeZoneStandard='microsoft.graph.timeZoneStandard'Iana'''

I'm trying to request the supported timezones in the IANA format for a user (in Java), and getting the following error:
Error code: RequestBroker--ParseUri
Error message: Syntax error at position 57 in 'TimeZoneStandard='microsoft.graph.timeZoneStandard'Iana'''.
GET https://graph.microsoft.com/v1.0/users/email#redacted.com/outlook/microsoft.graph.supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'Iana')
SdkVersion : graph-java/v2.3.1
Authorization : [PII_REDACTED]
400 : Bad Request
[...]
Based on our test suit, the request was working fine 3 days ago, and started failing with that error yesterday. We haven't changed anything for a while on our implementation, so I'm a bit baffled. For the request I'm essentially doing the following:
final String url = requestBuilder.outlook()
.getRequestUrlWithAdditionalSegment("microsoft.graph.supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'Iana')");
final OutlookUserSupportedTimeZonesCollectionRequestBuilder builder = new OutlookUserSupportedTimeZonesCollectionRequestBuilder(
url, requestBuilder.getClient(), null
);
IOutlookUserSupportedTimeZonesCollectionPage page = builder.buildRequest().get();
The reason I'm doing this instead of the standard:
final IOutlookUserSupportedTimeZonesCollectionPage page = requestBuilder.outlook()
.supportedTimeZones(TimeZoneStandard.IANA)
.buildRequest()
.get();
Is because this isn't working as expected, as described here: https://github.com/microsoftgraph/microsoft-graph-docs/issues/7594 (the issue is for C#, but happens in Java too).
What I notice is that the GET url looks fine, and works fine in the Graph Explorer using the /me endpoint instead of the /users endpoint. But the string in the error message looks modified:
'TimeZoneStandard='microsoft.graph.timeZoneStandard'Iana'''
If I'm not mistaken, the outer apostrophes are simply quoting done when printing the error message, but there are further apostrophes introduced after the = sign, which aren't present in the GET URI, which might be causing the syntax error. Still, I have no idea where those come from.
Any help or hint would be greatly appreciated!
I have modified the call something like this
https://graph.microsoft.com/v1.0/users/UPN/outlook/supportedTimeZones(TimeZoneStandard='Iana')
It worked for me.

What format of url is this with the colon almost in the end - https://speech.googleapis.com/v1p1beta1/speech:longrunningrecognize

I am trying to consume the google text to speech api here : https://cloud.google.com/speech-to-text/docs/async-recognize#speech-async-recognize-gcs-protocol
and it has this url format below
https://google-speech-api-base-urlspeech:longrunningrecognize
What is this URL format with colon(:)in the end?
When I try to hit this URL, it gives me an error specifically while running test case on it .e. Invalid URI. Invalid Port?
But the official google documentation says this is a valid url? How to use this?
This format of URL is called gRPC Transcoding syntax. Your first URL is invlaid , because it's in the first path segment of a relative-path reference.
https://google-speech-api-base-urlspeech:longrunningrecognize
This url is invalid for usage, whereas the one below, https://speech.googleapis.com/v1/speech:longrunningrecognize was running fine.
Try changing your URL to something like
https://google-speech-api-base-url/speech:longrunningrecognize. It will work.
I looked at the documentation page you referenced and was unable to see/find a URL that looked like:
https://google-speech-api-base-urlspeech:longrunningrecognize
However, what I did find was a URL of the form:
https://speech.googleapis.com/v1/speech:longrunningrecognize
which looks perfectly valid.
The documentation for this REST request can be found here:
https://cloud.google.com/speech-to-text/docs/reference/rest/v1/speech/longrunningrecognize
Could you have made an error in your reading and comprehension?
Apparently the colon (:) is legal in the path part of a URL:
Are colons allowed in URLs?

ERROR STATUS: URL contains outer http

I have a COLDFUSION page which except parameters from url and show them in fields. My url looks like this which is working.
http://www.example.com/test.cfm?activeUrl=www.msn.com&secure=False
But following is not working. I have added http before www in activeUrl value.
http://www.example.com/test.cfm?activeUrl=httpwww.msn.com&secure=False
It is giving me following error. "ERRROR STATUS: URL contains outer http"
Can any one help me to solve this problem?
For me, It seems that something related to iis configuration.
The string in httpwww.msn.com is causing your browser error. It should be http://www.msn.com, but should also be URL encoded.
ohh, i have not checked the application.cfc ONREQUESTSTART method. it has some condition for query string, which is showing this error. :(

URL get response error

I have the following lines in my Rails controller code
url_parsed = URI.parse(url)
response = Net::HTTP.get_response(url_parsed)
When I passed www.google.com as url, it gave
undefined method `request_uri' for #<URI::Generic:0x00000002e07908 URL:www.google.com>
on the second line, even though I don't call the method request_uri anywhere.
In this case, I'd like it to show my nice error page, instead of this ugly error. How can I do it?
your url string is missing a protocol: url="http://www.google.com"
Then your code will return Net::HTTPOK - see this documentation

UrlFetchApp.fetch( ) url with |

I have a url I want to get using google scripts' UrlFetchApp.fetch( ) command. Unfortunately this url has a | (gets partially encoded into %7c) in it and every time i try to fetch it I get an error saying 'invalid argument'. Any idea how to get around this issue and successfully fetch the url?
It seems to work if the url passed to UrlFetchApp.fetch is already encoded.
Let's say you want to fetch www.google.com/aaa|bbb (which doesn't really exist). The following script fails with "invalid argument":
UrlFetchApp.fetch("www.google.com/aaa|bbb");
But this one correctly returns a 404 as the request is valid but the page is not found:
UrlFetchApp.fetch("www.google.com/aaa%7Cbbb");
If that doesn't help, it would help if you could paste your url.

Resources