# Depositing DOI registration xml using https POST

**URL:** <https://community.crossref.org/t/depositing-doi-registration-xml-using-https-post/2181>\
**Category:** Technical Support\
**Tags:** content-registration, https\_post\
**Created:** [23 October 2021 13:56 UTC](https://community.crossref.org/t/depositing-doi-registration-xml-using-https-post/2181 "2021-10-23T13:56:46Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![sreekarthik](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sreekarthik](https://community.crossref.org/u/sreekarthik)\
**Post date:** [5 January 2022 13:04 UTC](https://community.crossref.org/t/depositing-doi-registration-xml-using-https-post/2181/12 "2022-01-05T13:04:16Z")

</div>

Am getting the below message

![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)

, success=1, statusCode=200}  
responseString:::

![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)

And my user name is : [srini@newgen.co](mailto:srini@newgen.co)

my http post code:  
try {

```
		post = new org.apache.http.client.methods.HttpPost(
				eachSpub.get("host") + "?operation=doDOICitUpload?login_id=" + eachSpub.get("username") + "?"
						+ "login_passwd=" + eachSpub.get("password"));

		post.setHeader("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*");

		post.setHeader("Content-Type", "multipart/form-data;boundary=---------------------------7d22911b10028e");

		post.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)");

		post.setHeader("Accept-Language", "en-us");

		post.setHeader("Content-Disposition", "form-data; name=fname" + "; filename=" + metaFileName);

		File file = new File(metaFile);

		FileEntity entity = new FileEntity(file);

		post.setEntity(entity);

		CloseableHttpResponse postresponse = client.execute(post);

		responseString = org.apache.http.util.EntityUtils.toString(postresponse.getEntity());

		responseObj = (HashMap<String, Object>) Utils.stringToMap(responseString);

		post.releaseConnection();

		responseObj.put("statusCode", postresponse.getStatusLine().getStatusCode());

		if (postresponse.getStatusLine().getStatusCode() == 200) {
			responseObj.put("response", responseString);
		} else {
			responseObj.put("response", "400 Bad Request error");
		}
		responseObj.put("success", 1);

		System.out.println("responseObj:::" + responseObj);
		System.out.println("responseString:::" + responseString);

		client.close();

	} catch (Exception e1) {
		responseObj.put("response", false);
		e1.printStackTrace();

	}
```

---

_[View the full topic](https://community.crossref.org/t/depositing-doi-registration-xml-using-https-post/2181)._
