How to enable GET request handling with Netflix DGS? - netflix-dgs

Sure, POST requests can execute anything but I do need to support the GET requests with the query strings too. It seems that, by default, Netflix DGS doesn't do this. I can't find the configuration setting to enable this either. Can anyone help?

Related

Getting the optimize flag to work on a local GraphHopper Routing Service

I have setup a local GraphHopper service on a local server and it works as advertised. I can pass it a set of points via rest, and get back a happy little JSON file of directions and an encoded route. Of course, "out of the box" the routing API is missing a toggle available in the paid Routing API service via graphhopper.com, and that is the optimize=true/false flag. This little addition will not only route between your passed points, but when set to true will also re-order them into the most optimal route.
Now I imagine to get this additional functionality one needs to somehow "bake in" some level of jsprit code. My level of understanding of Java and compiling code however is woefully inadequate here. Looking over numerous jsprit sites the best help I can find is "look at the source code for examples". Is there any sort of guide for building jsprit into the standard graphhopper JAR file, or does anyone know of any pre-built JARs out there with this functionality already built in? it's probably a long shot, but any help would be appreciated.

What do you mean by ''Exposing a JSON"

Just came across a person telling one of my colleagues to use jetty with his project and expose a JSON. Just curious about what it means. I searched the internet but found nothing. So what does it mean to expose a JSON?
As far as I understand, jetty is simply just another http server just like Tomcat etc. How is jetty different and how would it be used to expose a JSON?
Jetty is just a server like Apache's Tomcat or any other.
Since nobody has posted an answer on this, Exposing a JSON merely means receiving the response from a certain webpage (using the getmethod) in the form of a JSON. This could also be XML for people who would prefer that.
Browsers like Chrome and Firefox provide plugins that can be used for the same.
For Chrome, one such plugin is Postman. Can be added to your browser simply by going to the Chrome Web Store and searching for the same.
Hope this helps!

What are some good ways to benchmark a REST api service?

Currently I use the REST Console extension for Google Chrome to see the JSON responses. I really like this client because it allows me to send authenticated requests that would otherwise not work for a anonymous request.
Are there any tools that I can use similar to this where I can benchmark the performance of my server?
For example returning the average response time, response time when under stress(1000 requests/sec).
What tools can I use that will be able to provide me with this information for a REST api service? I've looked into Jmeter but I don't think there is a Chrome plugin for it. I'm looking for a open ended answer.
ab is one of the widely used apache benchmarking tool.
It provides the results in the format you are looking for with the kind of load you want to generate.
http://httpd.apache.org/docs/2.2/programs/ab.html

Detect Internet Connectivity

I am trying to figure out a way to do an internet connectivity check for an AIR for iOS app. Previously, I was using (against my better judgement) a URLMonitor that checked Google once every 30 seconds. I did not like putting that load onto Google and neither did they; this morning, our network got flagged as a possible DDoS attacker simply from testing the app. So I had to disable this type of check and move on.
I have thought about using the NetworkInfo ANE from Adobe, but that presents its own issues in determining internet connectivity. The only way I can think of doing it is to check for interfaces "en0" and "pdpxx" (which correspond to WiFi and Cellular interfaces, respectively) and check their IPs to ensure they are not in the 192.168.x.x, 10.10.x.x, or 127.0.x.x ranges. However, I am not entirely sure those are the only static router/localhost IPs out there and there is always the possibility that the network interface names will change in the future, which would render this monitor useless. There is also the issue of IPv6 possibly throwing a wrench into this method as well.
Is there another way to check if the user is connected to the internet? I've searched multiple times and it seems that these are the only two ways to check. If that is the case, what is the best way to check?
I'm surprised that you got flagged as a DDoS attacker, are you sure that's what happened?
In any case, if your not happy with putting the load onto someone else's server, then make your own server, just a basic setup that you use with the URLMonitor. You don't have to use google's url with the URLMonitor, you can pass it another URLRequest, which could point to your own server.
monitor = new URLMonitor(new URLRequest("http://www.you-own-server.com"));
This might also be useful if you decide that you want to pass more data between the app and the server. It's your server, so can do what you want with it.
I don't think there's any other way to check if the user is connected to the internet. To be honest, I don't see why there would be. Checking for the users interfaces/wan0 etc... probably would be possible, but you'd need another program, maybe a simple python or c++ program, that Air could use to check these things, but that sounds like the long way round.

ASCII drawing appearing as JSON response of request to Google

I am currently working on a small php library which would allow users to access data from the Google Play Developer Console, and insert it into a database, for future use.
To achieve this, I authenticate into the corresponding Google service with GET and POST requests (this part is still ok) and then do various POST requests to get all the data I need.
Everything was working fine, I got the script itself functioning (for fetching JSON responses) since 2 or 3 weeks, and I am launching it on a daily basis since then : no problems.
Today, I tried to launch it again, and as a JSON response for any POST request, I'm getting this :
I swear this is no fake, yet it's quite scary. Is Google trolling me right now?
Plus, the web version of the console still works, it just seems that my requests from outside don't.
I'm working on a localhost, so the hacking possibility is near (if not) 0, and I'm really worried that I made all this work for nothing.
if Google is actually trying to silence me from fetching data, plus making me rage, they are doing it right.
I've been googling this with all sort of keywords, still no luck.
Actually, I have solved this problem. As Google Webkit seems to regularly change the format of its JSON responses, my parsing and regular expressions were not working anymore to get the correct identifiers for authentication. I still think Google is trolling users or developers of non-official APIs, but now I have found a solution : manually check my parsing functions, adapting them to get every right value, and it's working again.
It's a pain, but if someone ever gets this problem and ends here, you know what to do!
(I can't be more precise, since these changes are totally random, but those are guidelines.)