Sha256: 2f9de9f2fb5be97e4d0bae52739974d00f92268117b2ee5ee8a4d9a36779dacb

Contents?: true

Size: 1.14 KB

Versions: 90

Compression:

Stored size: 1.14 KB

Contents

# 0.9.0

## Features

### Multiple requests with specific options

You can now pass a third element to the "request element" of an array to `.request`.

```ruby
requests = [
  [:post, "https://url/post", { form: { foo: "bar" } }],
  [:post, "https://url/post", { form: { foo: "bar2" } }]
]
HTTPX.request(requests)
# or, if you want to pass options common to all requests
HTTPX.request(requests, max_concurrent_requests: 1)
```


### HTTPX::Session#build_request

`HTTPX::Session::build_request` is now public API from a session. You can now build requests before you send them. These request objects are still considered somewhat "internal", so consider them immutable and **do not rely on its API**. Just pass them forward.

Note: this API is only available for instantiated session, so there is no `HTTPX.build_request`.


```ruby

HTTPX.wrap do |http|
  requests = [
    http.build_request(:post, "https://url/post", { form: { foo: "bar" } }),
    http.build_request(:post, "https://url/post", { form: { foo: "bar2" } })
  ]
  http.request(requests)
  # or, if you want to pass options common to all requests
  http.request(requests, max_concurrent_requests: 1)
end
```

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
httpx-0.21.0 doc/release_notes/0_9_0.md
httpx-0.20.5 doc/release_notes/0_9_0.md
httpx-0.20.4 doc/release_notes/0_9_0.md
httpx-0.20.3 doc/release_notes/0_9_0.md
httpx-0.20.2 doc/release_notes/0_9_0.md
httpx-0.20.1 doc/release_notes/0_9_0.md
httpx-0.20.0 doc/release_notes/0_9_0.md
httpx-0.19.8 doc/release_notes/0_9_0.md
httpx-0.19.7 doc/release_notes/0_9_0.md
httpx-0.19.6 doc/release_notes/0_9_0.md
httpx-0.19.5 doc/release_notes/0_9_0.md
httpx-0.19.4 doc/release_notes/0_9_0.md
httpx-0.19.3 doc/release_notes/0_9_0.md
httpx-0.19.2 doc/release_notes/0_9_0.md
httpx-0.19.1 doc/release_notes/0_9_0.md
httpx-0.19.0 doc/release_notes/0_9_0.md
httpx-0.18.7 doc/release_notes/0_9_0.md
httpx-0.18.6 doc/release_notes/0_9_0.md
httpx-0.18.5 doc/release_notes/0_9_0.md
httpx-0.18.4 doc/release_notes/0_9_0.md