IFconfig

This service provide an easy way to get information of your Internet connection and common requests through your web-browser or command line interface among the majority of websites that you visit. This is a re-implementation of the web service HttpBin.org a project create by Kenneth Reitz.

Requests

You can access all the following options using your web-browser or a software like CURL or WGet requesting a URL with one of the values shown bellow using the following URL format: https://cixtor.com/ifconfig/OPTION. You can use one of these filetypes to shown the option requested in an specific format:

Inspired in the web service HttpBin.org and the website ifconfig.me that resemble the UNIX command ifconfig.

Testing an HTTP Library can become difficult sometimes. Postbin is fantastic for testing POST requests, but not much else. This exists to cover all kinds of HTTP scenarios. Additional endpoints are being considered (e.g. /deflate). All endpoint responses are JSON-encoded.

Kenneth Reitz at HttpBin.org

/ This page.
/ip Returns Origin IP.
/user-agent Returns user-agent.
/headers Returns header dict.
/get Returns GET data.
/post Returns POST data.
/put Returns PUT data.
/patch Returns PATCH data.
/delete Returns DELETE data
/gzip Returns gzip-encoded data.
/status/:code Returns given HTTP Status code.
/redirect-to/blog 302 Redirects to the foo URL.
/cookies Returns cookie data.
/basic-auth/:user/:passwd Challenges HTTPBasic Auth.
/hidden-basic-auth/:user/:passwd 404'd BasicAuth.
/digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.
/delay/:n Delays responding for n–10 seconds.
/html Renders an HTML Page.
/robots Returns some robots.txt rules.
/deny Denied by robots.txt file.
/cache Returns 200 unless an If-Modified-Since header is provided,
       in which case will return a 304 Not Modified status code.

Examples

# Returns gzip-encoded data.
$ curl --compressed 'https://cixtor.com/ifconfig/gzip'
  Mon, 28 Oct 2013 01:38:53 +0000
# Returns POST data.
$ curl --data 'foo=bar' --data 'hello=world' 'https://cixtor.com/ifconfig/post'
  {"foo":"bar","hello":"world"}
# Returns given HTTP Status code.
$ curl --head 'https://cixtor.com/ifconfig/status/418'
  HTTP/1.1 418 I’m a teapot
  Host: cixtor.com
  Connection: close
  Cache-Control: no-cache
  Date: Mon, 28 Oct 2013 01:45:25 GMT
  Content-Type: text/plain; charset=UTF-8
# 302 Redirects to the foo URL.
$ curl --head 'https://cixtor.com/ifconfig/redirect-to/home'
  HTTP/1.1 302 Found
  Host: cixtor.com
  Connection: close
  Cache-Control: no-cache
  Location: https://cixtor.com/home
  Date: Mon, 28 Oct 2013 01:47:18 GMT
  Content-Type: text/html; charset=UTF-8
# Returns cookie data.
$ curl --cookie 'foo=bar; hello=world' 'https://cixtor.com/ifconfig/cookies'
  {"foo":"bar"," hello":"world"}
# Delays responding for n–10 seconds.
$ time curl 'https://cixtor.com/ifconfig/delay/5'
  Rendered after 5 seconds
  real  0m5.115s
  user  0m0.016s
  sys   0m0.008s
Do you have a project idea? Let's make it together!