I'm trying to use the xml.metadata.insert service on an installation of Geonetwork 3.1. I've had success putting the parameters (a snippet in the case of data) directly in the URL in a web-browser, such as the correct response is returned (uuid and id of the created resource) and a metadata record is created.
However, trying to emulate the same thing in either python (through the "requests" package) or in postman, results in a strange behaviour of a 200 status code, but html being returned (below) instead and the resource not being created.
<!DOCTYPE html
SYSTEM "html">
<html ng-app="gn_login" lang="eng" id="ng-app">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ICES Metadata Catalogue - International Council for the Exploration of the Sea (ICES)</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="icon" sizes="16x16 32x32 48x48" type="image/png" href="../../images/logos/favicon.png">
<link href="rss.search?sortBy=changeDate" rel="alternate" type="application/rss+xml" title="ICES Metadata Catalogue - International Council for the Exploration of the Sea (ICES)">
<link href="portal.opensearch" rel="search" type="application/opensearchdescription+xml" title="ICES Metadata Catalogue - International Council for the Exploration of the Sea (ICES)">
<link href="/geonetwork/static/gn_login_default.css" rel="stylesheet" media="screen">
<link href="/geonetwork/static/bootstrap-table.min.css" rel="stylesheet" media="screen">
<link href="/geonetwork/static/ng-skos.css" rel="stylesheet" media="screen">
<link href="/geonetwork/static/srv_custom_style.css" rel="stylesheet" media="screen">
</head>
<body data-ng-controller="GnCatController">
<div class="navbar navbar-default gn-top-bar" data-ng-hide="layout.hideTopToolBar" data-ng-include="'../../catalog/templates/top-toolbar.html'"></div>
<div data-ng-include="'../../catalog/templates/signin.html'"></div>
<div ng-include="'../../catalog/templates/info.html'"></div>
<script>var geonet = {provide:function(s){},require:function(s){}};</script>
<script src="/geonetwork/static/lib.js"></script>
<script src="/geonetwork/static/gn_login.js"></script>
<noscript>
<div class="alert" data-ng-hide="">
<strong></strong>
</div>
</noscript>
</body>
</html>
Is there anything that I'm doing incorrectly to receive this response?