Link Search Menu Expand Document

HTTP Methods

The HTTP methods supported

Table of contents

  1. TLDR
  2. Examples
    1. get
    2. post
    3. put
    4. delete
    5. patch
    6. head
    7. options

TLDR

Support http methods:

  • get
  • post
  • put
  • delete
  • patch
  • head
  • options

Examples

get

title: http method get
description: http method get
request:
  method: get
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

post

title: http method post
description: http method post
request:
  method: post
  url: 'http://httpbin.org/post'
  body: |
    {
        "hello": "world"
    }
  header:
    Content-Type: application/json
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

put

title: http method put
description: http method put
request:
  method: put
  url: 'http://httpbin.org/put'
  body: |
    {
        "hello": "world"
    }
  header:
    Content-Type: application/json
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

delete

title: http method delete
description: http method delete
request:
  method: delete
  url: 'http://httpbin.org/delete'
  header:
    Content-Type: application/json
    Accept: application/json
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

patch

title: http method patch
description: http method patch
request:
  method: patch
  url: 'http://httpbin.org/patch'
  body: |
    {
        "hello": "world"
    }
  header:
    Content-Type: application/json
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json
title: http method head
description: http method head
request:
  method: head
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

options

title: http method options
description: http method options
request:
  method: options
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength: 0
  contentType: text/html