curl -X POST -u <user>:<password> "https://nexus:8081/service/rest/v1/components?repository=<repository name>" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "maven2.groupId=<group id>" -F "maven2.artifactId=<id>" -F "maven2.version=1.0.0" -F "maven2.asset1=@/path/to/asset.json;type=application/json" -F "maven2.asset1.extension=json"
I was unable to "translate" it to python, using either "requests" or "urllib2" or "urllib3", no matter what I tried. (I keep getting 400s or 500s). I prefer not using the "subprocess" command to execute it.
Has anyone succeeded in doing that or has any idea how it can be accomplished?
Thanks!
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/5b2be829-d920-4909-a412-eec7a3ff542c%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus...@glists.sonatype.com.
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/03346fe8-66ad-4c15-915a-360ff2f9ad54%40glists.sonatype.com.
![]() |
Michael Prescott Product Manager, NXRM Phone: (301)684-8080 |