The new Gigahorse 0.1.0 page states that it is “an HTTP client for Scala with Async Http Client underneath.”
Summary: This post is an excerpt from the Scala Cookbook, partially modified for the internet. This is a short recipe, Recipe 15.13, “How to set HTTP headers when sending a web service request.”
You need to set URL headers when making an HTTP request in Scala.
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is a very short recipe, Recipe 15.12, “How to access HTTP response headers after making an HTTP request with Apache HttpClient.”
You need to access the HTTP response headers after making an HTTP request in your Scala code.
Use the Apache HttpClient library, and get the headers from the
HttpResponse object after making a request:
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 15.10, “How to create a Twitter client in Scala.”
You want to create a client to connect to Twitter to access the information you want, such as showing timelines and trends.
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 15.9, “How to write a simple HTTP GET request client in Scala.”Back to top
You want an HTTP client you can use to make
GET request calls.
There are many potential solutions to this problem. This recipe demonstrates three approaches:Back to top
Photo from @raganwald. Definitely reminds me of the consulting world.
I don’t remember where I took this picture from, I assume it is the Play Framework docs, but it offers a nice explanation of how a Future works in the Play Framework, especially in regards to blocking the client and server.
I’ve started to write a mobile app using Sencha Touch for the client, and the Play Framework and Scala on the server side (to create a RESTful API). At some point I may make all of this code open source, but for today I’m just going to share some pictures of the Sencha Touch client.
First, here’s the Notes screen. A note can be anything with a title, and optional body:
I just ran into a situation for a Drupal/PHP client where I wanted to log some access information. There was some unusual access activity on the website, and I want to log IP addresses and URLs for a few days.
As part of that, I wanted to get the web client's IP address, and in PHP you get the client IP address like this:
$ip = $_SERVER['REMOTE_ADDR'];
That returns something like this:
If you just need to get a web client's IP address from a PHP script, that's all you need.