Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing exports and documentation of http_reply and http_status_reply #152

Open
spl opened this issue May 6, 2022 · 0 comments
Open

Comments

@spl
Copy link

spl commented May 6, 2022

There are a number of inconsistencies between what's exported, what's documented for the predicate, and what's actually defined for http_reply and http_status_reply in http_header.pl.

Also, note that Status is mentioned in the docs for http_reply but doesn't show up in the documentation.

% Exports
http_reply/2,  % +What, +Stream
http_reply/3,  % +What, +Stream, +HdrExtra
http_reply/4,  % +What, +Stream, +HdrExtra, -Code
http_reply/5,  % +What, +Stream, +HdrExtra, +Context, -Code
http_reply/6,  % +What, +Stream, +HdrExtra, +Context, +Request, -Code
% Docs
%!  http_reply(+Data, +Out:stream) is det.
%!  http_reply(+Data, +Out:stream, +HdrExtra) is det.
%!  http_reply(+Data, +Out:stream, +HdrExtra, -Code) is det.
%!  http_reply(+Data, +Out:stream, +HdrExtra, +Context, -Code) is det.
%!  http_reply(+Data, +Out:stream, +HdrExtra, +Context, +Request, -Code) is det.
% Predicates
http_reply(What, Out) :-
http_reply(Data, Out, HdrExtra) :-
http_reply(Data, Out, HdrExtra, Code) :-
http_reply(Data, Out, HdrExtra, Context, Code) :-
http_reply(Data, Out, HdrExtra, _Context, Request, Code) :-
http_reply(Status, Out, HdrExtra, Context, Request, Code) :-
% Exports
http_status_reply/4,  % +Status, +Out, +HdrExtra, -Code
http_status_reply/5,  % +Status, +Out, +HdrExtra, +Context, -Code
% Docs
%!  http_status_reply(+Status, +Out, +HdrExtra, -Code) is det.
%!  http_status_reply(+Status, +Out, +HdrExtra, +Context, -Code) is det.
%!  http_status_reply(+Status, +Out, +HdrExtra, +Context, +Request, -Code) is det.
% Predicates
http_status_reply(Status, Out, Options) :-
http_status_reply(Status, Out, HdrExtra, Code) :-
http_status_reply(Status, Out, HdrExtra, Context, Code) :-
http_status_reply(Status, Out, HdrExtra, Context, Request, Code) :-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant