Improvements:
- Ability to use
map[string]anyas a type for encoding XML-RPC<struct>(#92 with original contribution from @gustavs ). - Ability to use a shortcut argument by passing
map[string]anywithout wrapping it in astruct{}when a single argument of type<struct>is expected.
Bugfixes:
- Decoding an
<array>of mixed types that contains another set of nested<array>(with equally mixed types) (#86). Outer slice would need to be defined as[]anyand it's up to the user to cast the inner values (including nested slices) to the desired/expected type.
Bugfixes:
- Decoding a
<struct>that is nested in<array>with variable types (e.g mix of ints, bool, string and structs) (#84). Structs will be decoded into amap[string]anytype, as it's not possible to decode.
Bugfixes:
- Handling of empty values while decoding responses (#80).
Library will now properly handle empty values for<string>,<int>,<i4>,<boolean>,<double>,<dateTime.iso8601>,<base64>and<array>(with case of<data />). As<struct>may not have an empty list of<member>elements as per specification. Similarly<array/>is considered invalid.
Improvements:
- Ability to decode struct members into a map.
Bugfixes:
- Adding missing handling of undeclared value types to default to
stringas per XML-RPC spec (previouslynilwould be returned)
Library is now built against Go 1.21
Improvements:
- Ability to remap struct member names to via
xmlrpctags (#47) - Ability to skip unknown fields by
SkipUnknownFields(bool)Option. Default is stillfalse(#48)
Library is now built against Go 1.19
Improvements:
- Fixes go routine leak that is caused by
Codec(#52) - A bit more robust tests that do not call remote systems
- House keeping: dependency updates, no longer using deprecated methods in Go, making linter happier..
Library is now built against Go 1.18
Improvements:
-
NewClientsupports receiving a list ofOptions that modify clients behavior.
Initial supported options are:HttpClient(*http.Client)- set customhttp.Clientto be usedHeaders(map[string]string)- set custom headers to use in every request (kudos: @Nightapes)UserAgent(string)- set User-Agent identification to be used (#6). This is a shortcut for just settingUser-Agentcustom header
Deprecations:
NewCustomClientis deprecated in favor ofNewClient(string, ...Option)withHttpClient(*http.Client)option. This method will be removed in future versions.
Improvements to parsing logic for responses:
- If response struct members are in snake-case - Go struct should have member in camel-case
- It is now possible to use type aliases when decoding a response (#1)
- It is now possible to use pointers to fields, without getting an error (#2)
Mainly documentation and internal refactoring:
- Made
EncoderandDecoderinto interfaces with correspondingStdEncoder/StdDecoder. - Removal of intermediate objects in
Codec
Initial release version of XML-RPC client.
- Support for all XML-RPC types both encoding and decoding.
- A client implementation based on
net/rpcfor familiar interface. - No external dependencies (except testing code dependencies)