Note that the list of headers has the field name as a binary. The field value is iodata, which is either a binary or an iolist.
Use gun:head/{2,3}
if you don’t need the response body.
Use gun:head/{2,3,4}
if you don’t need the response body.
DELETE
-Use gun:delete/{2,3}
to delete a resource.
Use gun:delete/{2,3,4}
to delete a resource.
Requests with an arbitrary method
-The gun:request/{4,5}
function can be used to send requests
+
The gun:request/{4,5,6}
function can be used to send requests
with a configurable method name. It is mostly useful when you
need a method that Gun does not understand natively.
gun:flush(StreamRef).
Redirecting responses to a different process
+Gun allows you to specify which process will handle responses
+to a request via the reply_to
request option.
StreamRef = gun:get(ConnPid, "/organizations/ninenines", [], + #{reply_to => Pid}).