18 April 2014

The Ruby Reflector

Topic

Request

  Source Favicon
By Matt Soldo of Heroku 1 month ago.
Email

HTTP Request IDs are now enabled on all Heroku apps.

Understanding X-Request-ID on Heroku

Each HTTP request that reaches your dyno will now contain an X-Request-ID header. Heroku will pass through existing X-Request-ID headers if they are set by the HTTP client. For requests that lack the header, Heroku generates an ID. Your application code can read the request ID from the header and include it in logs, or use it for other purposes. Heroku will write …

blog.heroku.com Read
  Source Favicon
By John Resig of John Resig 5 months ago.
Email

Select HTTP PUT Request and http://nodestreams.com/output/people.html .

The resulting code:

var request = require ( "request" ) ;

var zlib = require ( "zlib" ) ;

var Iconv = require ( "iconv" ) . Iconv ;

var csv = require ( "csv-streamify" ) ;

var Handlebars = require ( "handlebars" ) ;

var es = require ( "event-stream" ) ;

var tmpl = Handlebars. compile ( "<tr><td><a …

ejohn.org Read
  Source Favicon
Email

4.0 throws a 400 "Bad Request" error in the format the client specifies.

Here's the default rails 3.2 error - not great. > curl -H "Accept: application/json" -H "Content-type: application/json" 'http://localhost:3000/posts' -d '{ i am broken'

<!DOCTYPE html> <html> <!-- default 500 error page omitted for brevity --> </html>

Here's the default Rails 4 error. Not bad, but it could be better. > …

robots.thoughtbot.com Read
  Source Favicon
By Jeremy Templier of New Relic 1 year ago.
Email

…gives you a clear vision of how performant they are. When you know the number of requests sent for ‘ Request A', you'll be able to tell how much time is spent in each request.

Welcome to the Real World

I'd like to show you some improvements we've made in our iOS API and to our iOS app thanks to New Relic for Mobile Apps.

Track the HTTP Errors

A few weeks ago, we saw that the number of 403 errors was high. So we started to investigate it with New Relic for …

newrelic.com Read
  Source Favicon
By Loren Segal of gnuu.org over 1 year ago.
Email

…of a real world application and not just a testing scenario. Maybe we want to take our monolithic Request class and instead run our requests over some HTTP-like protocol over UDP, or maybe even a serial port. If calling Net:: HTTP.new is buried somewhere in an internal # send method, there's not much we can do without DI. We can monkeypatch or redefine methods directly on an instance, but these are not thread-safe or elegant solutions to the problem. DI is the elegant solution, …

gnuu.org Read
  Source Favicon
By Patrick Reagan of Viget.com Blogs over 1 year ago.
Email

def request @ request ||= Rack::Request.new(@environment) end

def user_agent Mobile::UserAgent.new(request.env['HTTP_USER_AGENT']) end

def mobile_requested? request.params['mobile'] == '1' end

def serve_mobile? mobile_requested? || user_agent.mobile? end

def set_mobile_accept_header request.env['HTTP_ACCEPT'] = 'text/html+mobile' end

def response status, headers, body = @application.call(request.env) …

viget.com Read
  Source Favicon
By Jordan Maguire of Transcending Frontiers over 1 year ago.
Email

The 400 Bad Request status indicates that the request ‘could not be understood by the server due to malformed syntax'. See the IETF docs

There is also the 422 Unprocessable Entity status code that appears to be popular for roughly the same purpose. I've read from a couple of sources that since the 422 is part of the WebDAV extension that 400 is preferable over 422. I don't have the knowledge to weigh in on this argument. Perhaps someone can enlighten …

thefrontiergroup.com.au Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 1 year ago.
Email

Week of August 13 - August 19, 2012

Looks like there's some focus on ActiveRecord optimizations currently. That's work that many people will welcome.

DHH's routing concerns plugin gets merged to the main line at 0dd24728b - documentation is at 0bd7b07d . This lets you tidy up your routes.rb file by declaring common reusable resources.

0d0d4622 adds Request#formats=(extensions) to let you set a prioritized list of multiple formats to use in response.

afreshcup.com Read
  Source Favicon
By andrewperk of Videos related to 'Ruby on Rails demo' over 2 years ago.
Email

Cakephp model exists method Cakephp 2.0 exceptions Cakephp Request data array Cakephp Request is method Cakephp Form helper postLink method Cakephp 2.0 overall controller action changes for CRUD

You can download both the starting sourcecode to follow along with the tutorial and download the ending sourcecode if you want to see what the completed code looks like at my website:

http://www.andrews-custom-web-design.com/cakephp.html

Cakephp 2.0 Update source code:

http://www.andrews-custom-web-design.com/support-files/learncaketwo.zip …

youtube.com Read
  Source Favicon
On Unspace Blog over 2 years ago.
Email

By software consulting standards, Unspace Interactive is a small boutique. As a byproduct of our small size and close relationship with the startup community, more than half of the Request for Proposals 1 we consider are for what I call " Software that Powers the Startup."

The typical RFP for Software that Powers the Startup is from an entrepreneur that wishes to launch a web-based technology business. The request is that we develop a plan to design and …

rethink.unspace.ca Read