Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:12:57+00:00 2026-06-06T06:12:57+00:00

When I attempt to use SWI-Prolog’s http_post/4 , as follows: :- use_module(library(http/http_client). update(URL, Arg)

  • 0

When I attempt to use SWI-Prolog’s http_post/4, as follows:

:- use_module(library(http/http_client).

update(URL, Arg) :-
    http_post(URL, form([update = Arg), _, [status_code(204)]).

When I query this rule, and watch the TCP traffic, I see the HTTP POST request and reply with the expected 204 status code both occur immediately. However, Prolog hangs for up to 30 seconds before returning back ‘true’. What is happening that prevents the rule from immediately returning?

I’ve tried this variant as well, but it also hangs:

:- use_module(library(http/http_client).

update(URL, Arg) :-
    http_post(URL, form([update = Arg), Reply, [status_code(204)]),
    close(Reply).

I have a similar issue with http_delete/3, but not with http_get/3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:13:05+00:00Added an answer on June 6, 2026 at 6:13 am

    library docs state that http_post

    It is equivalent to http_get/3, except for providing an input document, which is posted using http_post_data/3.

    http_get has timeout(+Timeout) in its options. That could help to lower the latency, but as it is set to +infinite by default, I fear will not solve the issue. Seems like the service you are calling keeps the connection alive up to some timeout.

    Personally I had to use http_open, instead of http_post, when calling Google API services on https…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I attempt to use the iterator form of parsing for a Spirit grammar
My attempt to use background-clip: content-box is failing. The entire box has a background,
First attempt to use this cool site - after searching for 2 hours: So
I attempt to use webservice return POCO class generated from entity data model as
I've been making a first attempt to use fluent nHibernate on an ASP.NET MVC
I'd like to test a Java Service Call. My first attempt was to use
In an attempt to learn to use PInvoke in C#, I'm a little unsure
I'm trying to use NSTableView (it's my first attempt at it) but it's showing
in my attempt to learn a bit faster the use of spring and hibernate
Wondering if there is a way to use a python script to attempt a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.