{% set version = '1.2.1' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-httr
  version: {{ version|replace("-", "_") }}

source:
  fn: httr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/httr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/httr/httr_{{ version }}.tar.gz
  sha256: e7b90b90ee52c826e152efcfadf98e078fa75b65a6baaeb8fd25eeed2195730e

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-r6
    - r-curl >=0.9.1
    - r-jsonlite
    - r-mime
    - r-openssl >=0.8

  run:
    - r-base
    - r-r6
    - r-curl >=0.9.1
    - r-jsonlite
    - r-mime
    - r-openssl >=0.8

test:
  commands:
    - $R -e "library('httr')"  # [not win]
    - "\"%R%\" -e \"library('httr')\""  # [win]

about:
  home: https://github.com/hadley/httr
  license: MIT
  summary: Useful tools for working with HTTP organised by HTTP verbs (GET(), POST(), etc). Configuration
    functions make it easy to control additional request components (authenticate(),
    add_headers() and so on).
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
