Post curl function save twice using plugin hook function wordpress

That is normal behaviour. See this question on WordPress Stack Exchange: Plugin Development: WordPress processes twice on post update. How to skip process on the first? answered by @Hameedullah Khan.

WordPress call functions hooked to save_post twice because:

  • first time it saves the post revision.
  • second time it saves the actual post.

As Hameedulah suggests, from your save_function() hooked at save_post action, you can return if DOING_AUTOSAVE:

if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
    return;