This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
Releases: OpenFn/language-http
Releases · OpenFn/language-http
always return __cookies and __headers when `keepCookie: true`
always return __cookies
and __headers
when keepCookie: true
Provide backwards compatibility with v2
v3.1.2 bump version for backwards compatibility with v2
Allow successCodes to be passed in options
Defaults to 201, 201, 203 (as per version 2 of the adaptor) but allows for users to specify their own codes.
get('path', {
options: {
successCodes: [200, 201, 202]
}
});
Exposes request response in state, allow `agentOptions` params
post(
`${state.configuration.url}/Users/login`,
{
headers: { 'content-type': 'application/json' },
body: {
email: state.configuration.email,
password: state.configuration.password,
},
// agentOptions allows us to build a new https agent with non-standard settings...
agentOptions: { rejectUnauthorized: false, ca: 'some-private-key-string' },
},
state => {
console.log(state.response) // display the _whole_ response from axios
console.log(state.data) // display response.data from axios
return state;
}
);
Restore request for backwards compatibility
And add new language-common for to allow custom https
modules or FormData
usage.
Update docs, remove request entirely
v3.0.1 remove request entirely
Replace request with axios
This release provides a host of new functionality and configuration options via axios
and exposes the http
module directly from language-common
.
Find url inside params for cookie handling
v2.4.15 params.url in cookie handler
Spread on rest
Handle any additional options passed to node request
with a spread operator.
Cleaned README
This version provides a cleaner README and inline documentation.