Namespace org.wasmcloud.interface.httpclient

Services
Operations
Lists
Maps

HeaderMap(map)

map data structure for holding http headers

key: String
value: HeaderValues

HeaderValues(list)

member: String  

HttpClient(service)

HttpClient - issue outgoing http requests via an external provider To use this capability, the actor must be linked with "wasmcloud:httpclient"

Operations

Traits

org.wasmcloud.model#wasmbus [object]

HttpRequest(structure)

http request to be sent through the provider

body: Blob request body, defaults to empty
headers: HeaderMap optional headers. defaults to empty
method: String http method, defaults to "GET"
url: String

HttpResponse(structure)

response from the http request

body: Blob response body
header: HeaderMap Case is not guaranteed to be normalized, so actors checking response headers need to do their own case conversion. Example (rust): // check for 'Content-Type' header let content_type:Option<&Vec> = header.iter() .map(|(k,_)| k.to_ascii_lowercase()) .find(|(k,_)| k == "content-type") .map(|(_,v)| v);
statusCode: org.wasmcloud.model#U16 response status code

Request(operation)

Issue outgoing http request

input: HttpRequest
output: HttpResponse