rafaeldx7/ruby-bitly

View on GitHub
fixtures/vcr_cassettes/shorten_long_url.yml

Summary

Maintainability
Test Coverage
---
http_interactions:
- request:
    method: post
    uri: https://api-ssl.bitly.com/v3/shorten
    body:
      encoding: UTF-8
      string: longURL=http%3A%2F%2Fgoogle.com&login=my-login&apiKey=my-api-key
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      Content-Length:
      - '89'
      Content-Type:
      - application/x-www-form-urlencoded
      User-Agent:
      - Ruby
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Sat, 01 Oct 2016 19:28:37 GMT
      Content-Type:
      - application/json; charset=utf-8
      Content-Length:
      - '184'
      Connection:
      - keep-alive
      Mime-Version:
      - '1.0'
    body:
      encoding: UTF-8
      string: '{ "status_code": 200, "status_txt": "OK", "data": { "long_url": "http:\/\/google.com\/",
        "url": "http:\/\/bit.ly\/lVW32C", "hash": "lVW32C", "global_hash": "3j4ir4",
        "new_hash": 0 } }

'
    http_version: 
  recorded_at: Sat, 01 Oct 2016 19:28:37 GMT
recorded_with: VCR 3.0.3