You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ChristianGruen I don't remember exactly why that rule was chosen, but I suspect it was to enable easier handling of some other headers which are actually lists.
@dcore94 I don't think this should cause you any problems in practice, as you could do something like this:
declare
%rest:GET
%rest:path("/widget/{$id}")
%rest:header-param("If-Modified-Since", "{$modified-since-header}")
functionlocal:widget($id as xs:int, $modified-since-header as xs:string*) {
let $modified-since := string-join($modified-since-header, ",")
return
<if-modified-since>{$modified-since}</if-modified-since>
};
I need to use the
If-Modified-Since
header in one of my APIs. The format requested is the IETF date format:as explained in [1].
Unfortunately this conflicts with the specification in [2] where it's stated that commas are separators for multi value parameters.
Is there any way out of this without having to join back the values manually?
M.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
[2] http://exquery.github.io/exquery/exquery-restxq-specification/restxq-1.0-specification.html#form-header-annotation
The text was updated successfully, but these errors were encountered: