httpbin

App · Utilities · 10 actions

A dependable place to point a step at while you build a workflow, from httpbin. Send a request and get the whole thing back, so you can see exactly what your workflow sends: the method, the query values, every header and the body. Then force the cases that are hard to arrange for real, and build the branches that handle them: a 500, a 404, a rate limit, a response that takes ten seconds, a chain of redirects, a password or token that gets rejected. It will also tell you which IP address your workflows call from, for a service that keeps an approved list, and hand you a unique ID or a sample document to work against. Nothing is stored and nothing is charged. No account or API key required.

Actions

ActionWhat it does
Check the headers we sendSee every header a request from Lodol carries, without setting anything up.
Check the IP address we call fromFind out which public IP address your workflows reach the internet from.
Generate a unique IDGet a fresh unique ID, different every time.
Get a sample documentGet a small nested JSON document, the same one every time.
Send a test requestSend a request and get the whole thing back: the method, the address, the query values, every header and the body.
Simulate a response statusMake httpbin answer with the status you choose, so you can build and test the branch that handles it.
Simulate a slow responseMake httpbin take its time before answering, so you can see how a workflow behaves against a slow service and whether a timeout is set where you think it is.
Test a bearer tokenSend a token the way an API expecting one would receive it, and get it read back to you.
Test a username and passwordSend a username and password the way a service expecting them would receive them, and see whether they arrive intact.
Test following redirectsSend a request through a chain of redirects and see where it ends up.

Check the headers we send

See every header a request from Lodol carries, without setting anything up. Useful when a service is refusing your requests and you need to know what it is actually being handed. To check a header of your own, use Send a test request instead. No API key required.

Inputs

None.

Outputs

countnumber
How many headers there were.
header_nameslist
Just the names, in alphabetical order, for a step that only needs to check one is there.
headersobject
Every header httpbin received: the ones we send, plus the two the internet adds on the way (Host, and Amazon's trace id).
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
user_agenttext
How Lodol identifies itself. This is the value to give a service that asks you to name your client.
Example output
{
  "count": 5,
  "header_names": [
    "Accept",
    "Accept-Encoding",
    "Host",
    "User-Agent",
    "X-Amzn-Trace-Id"
  ],
  "headers": {
    "Accept": "application/json",
    "Accept-Encoding": "gzip, deflate",
    "Host": "httpbin.org",
    "User-Agent": "Lodol-httpbin-Integration/1.0 (+https://lodol.ai)",
    "X-Amzn-Trace-Id": "Root=1-6a99d17f-4404b02f7da0b171"
  },
  "response_time_ms": 42.9,
  "user_agent": "Lodol-httpbin-Integration/1.0 (+https://lodol.ai)"
}

Check the IP address we call from

Find out which public IP address your workflows reach the internet from. This is the address to give a service that will only accept requests from an approved list. No API key required.

Inputs

None.

Outputs

ip_addresstext
The public IP address the request came from. This is the one to add to an approved list.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
Example output
{
  "ip_address": "203.0.113.42",
  "response_time_ms": 39.1
}

Generate a unique ID

Get a fresh unique ID, different every time. For tagging a run, naming a file, or filling a field that has to be unlike every other one. No API key required.

Inputs

None.

Outputs

response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
uuidtext
The ID, as 36 characters with hyphens, e.g. 1b4e28ba-2fa1-11d2-883f-0016d3cca427.
Example output
{
  "response_time_ms": 56.4,
  "uuid": "1b4e28ba-2fa1-11d2-883f-0016d3cca427"
}

Get a sample document

Get a small nested JSON document, the same one every time. Something real-shaped to build the rest of a workflow against while the payload it will really receive does not exist yet. No API key required.

Inputs

None.

Outputs

authortext
Who it says wrote it, lifted to the top.
documentobject
The document exactly as httpbin serves it, wrapper and all, so it is a genuinely nested payload to practise reaching into.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
slide_countnumber
How many sections there are.
slideslist
Its sections, flattened into one shape so a loop can read them all the same way.
titletext
The document's title, lifted to the top.
Example output
{
  "author": "Yours Truly",
  "document": {
    "slideshow": {
      "author": "Yours Truly",
      "date": "date of publication",
      "slides": [
        {
          "title": "Wake up to WonderWidgets!",
          "type": "all"
        },
        {
          "items": [
            "Why <em>WonderWidgets</em> are great",
            "Who <em>buys</em> WonderWidgets"
          ],
          "title": "Overview",
          "type": "all"
        }
      ],
      "title": "Sample Slide Show"
    }
  },
  "response_time_ms": 58.5,
  "slide_count": 2,
  "slides": [
    {
      "items": [],
      "title": "Wake up to WonderWidgets!"
    },
    {
      "items": [
        "Why <em>WonderWidgets</em> are great",
        "Who <em>buys</em> WonderWidgets"
      ],
      "title": "Overview"
    }
  ],
  "title": "Sample Slide Show"
}

Send a test request

Send a request and get the whole thing back: the method, the address, the query values, every header and the body. The step to put in front of a new integration to see exactly what your workflow is sending before you point it at something real. Nothing is stored and nothing is charged. No API key required.

Inputs

MethodmethodtextRequired
How to send it. Every choice comes back the same way, so this is for matching the request your real integration will make.One of: GET (GET (fetch something)), POST (POST (create something)), PUT (PUT (replace something)), PATCH (PATCH (change part of something)), DELETE (DELETE (remove something)). Default: GET.
Query valuesqueryobject
Optional. Names and values to put on the end of the address. They come back under 'query', which is how you check one was filled in from an earlier step.
Headersheadersobject
Optional. Extra headers to send. They come back alongside the ones we always send, which is how you check an authorization or tracking header really left.
Bodybodyobject
Optional. Names and values to send as the JSON body. Numbers, true and false and nested values keep their type, so what comes back is what went out.

Outputs

bodyobject
The body, read back as JSON with its types intact. Empty when nothing was sent.
body_texttext
The body exactly as it went over the wire. Worth reading when the parsed version surprises you.
called_from_iptext
The public IP address the request came from.
headersobject
Every header httpbin received: the ones you set, the ones we always send, and the two the internet adds on the way (Host, and Amazon's trace id).
methodtext
The method httpbin saw, e.g. POST.
queryobject
The query values httpbin read off the address. Always text, because that is all a query string can carry.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The HTTP status httpbin answered with.
urltext
The full address the request arrived at, query values and all.
Example output
{
  "body": {
    "name": "Ada Lovelace",
    "score": 9
  },
  "body_text": "{\"name\": \"Ada Lovelace\", \"score\": 9}",
  "called_from_ip": "203.0.113.42",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Host": "httpbin.org",
    "User-Agent": "Lodol-httpbin-Integration/1.0 (+https://lodol.ai)",
    "X-Run-Id": "abc-123"
  },
  "method": "POST",
  "query": {
    "team": "acme"
  },
  "response_time_ms": 148.3,
  "status_code": 200,
  "url": "https://httpbin.org/anything?team=acme"
}

Simulate a response status

Make httpbin answer with the status you choose, so you can build and test the branch that handles it. The step itself always succeeds, even when you ask for a 500: the status comes back as a value to branch on, because a step that failed would leave nowhere to put the branch. No API key required.

Inputs

Status to returnstatus_codetextRequired
The answer httpbin should give. Pick the one your workflow has to survive.One of: 200 (200 OK), 201 (201 Created), 202 (202 Accepted), 204 (204 No Content), 400 (400 Bad Request), 401 (401 Unauthorized), 403 (403 Forbidden), 404 (404 Not Found), 405 (405 Method Not Allowed), 408 (408 Request Timeout), and 10 more. Default: 500.

Outputs

as_requestedtrue/false
True when the status that came back is the one asked for. False means something between here and httpbin answered instead.
categorytext
The family it belongs to: Success, Client error, Server error, Redirect or Informational. Branch on this to handle all of a kind at once.
oktrue/false
True for any status from 200 to 299.
reasontext
What the status means in words, e.g. Not Found.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The status that came back. This is the field to branch on.
Example output
{
  "as_requested": true,
  "category": "Server error",
  "ok": false,
  "reason": "Internal Server Error",
  "response_time_ms": 38.5,
  "status_code": 500
}

Simulate a slow response

Make httpbin take its time before answering, so you can see how a workflow behaves against a slow service and whether a timeout is set where you think it is. Up to ten seconds. No API key required.

Inputs

Seconds to waitsecondsnumberRequired
How long httpbin should take before it answers. Between 0 and 10; 3 by default. Fractions are fine.From 0 to 10.0. Default: 3.0.

Outputs

requested_secondsnumber
The wait that was asked for.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The HTTP status httpbin answered with.
Example output
{
  "requested_seconds": 3,
  "response_time_ms": 3061.4,
  "status_code": 200
}

Test a bearer token

Send a token the way an API expecting one would receive it, and get it read back to you. That read-back is the point: it proves the value your workflow built is the value that left the building. Choose to have it rejected instead and you get the same refusal a real API gives, to build the other branch against. No API key required.

Inputs

TokentokentextRequired
The token to send. Nothing is stored, so this is for a test value rather than a real one.
What should happenresulttextRequired
Accept the token to check that it arrives intact, or reject it to get the same refusal a real service would give, so you can build the branch that handles credentials going bad.One of: accept (Accept the credentials), reject (Reject the credentials). Default: accept.

Outputs

authenticatedtrue/false
True when the token was accepted. This is the field to branch on.
messagetext
What happened, in a sentence.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The HTTP status httpbin answered with.
tokentext
The token httpbin read back out of the request. Empty when it was rejected, because nothing was sent.
Example output
{
  "authenticated": true,
  "message": "The credentials were accepted.",
  "response_time_ms": 55.1,
  "status_code": 200,
  "token": "test-token-123"
}

Test a username and password

Send a username and password the way a service expecting them would receive them, and see whether they arrive intact. This is what catches a password with an awkward character in it, or a value that was never filled in from an earlier step. Choose to have them rejected instead and you get the same refusal a real service gives, to build the other branch against. No API key required.

Inputs

UsernameusernametextRequired
The username to send. Anything but a slash, which httpbin cannot carry.
PasswordpasswordtextRequired
The password to send. Nothing is stored, so this is for a test value rather than a real one. Anything but a slash, which httpbin cannot carry.
What should happenresulttextRequired
Accept the username and password to check that it arrives intact, or reject it to get the same refusal a real service would give, so you can build the branch that handles credentials going bad.One of: accept (Accept the credentials), reject (Reject the credentials). Default: accept.

Outputs

authenticatedtrue/false
True when they were accepted. This is the field to branch on.
messagetext
What happened, in a sentence.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The HTTP status httpbin answered with.
usernametext
The username httpbin read back out of the request. Compare it with what you sent to prove it survived the trip.
Example output
{
  "authenticated": true,
  "message": "The credentials were accepted.",
  "response_time_ms": 58.2,
  "status_code": 200,
  "username": "ada@example.com"
}

Test following redirects

Send a request through a chain of redirects and see where it ends up. Answers whether Lodol follows redirects at all, and how many deep, which is the usual reason a request that works in a browser does not work in a workflow. No API key required.

Inputs

Redirects to go throughcountnumberRequired
How long the chain should be. Between 1 and 10; 3 by default.From 1 to 10. Default: 3.

Outputs

all_followedtrue/false
True when the whole chain was followed. This is the field to branch on.
final_urltext
Where the chain ended up.
redirects_followednumber
How many were actually followed, counted from the trip that happened rather than from what was asked for.
redirects_requestednumber
How long a chain was asked for.
response_time_msnumber
How long the whole round trip took, in milliseconds. This is the number to compare against a timeout.
status_codenumber
The HTTP status httpbin answered with.
Example output
{
  "all_followed": true,
  "final_url": "https://httpbin.org/get",
  "redirects_followed": 3,
  "redirects_requested": 3,
  "response_time_ms": 60.0,
  "status_code": 200
}

On this page