Skip to content

Commit

Permalink
Fix the docs to be more current. (#79)
Browse files Browse the repository at this point in the history
The POST example now requires an empty body for curl to send. The
docs have been updated to reflect it. This should fix #77.

The PATCH example could be condensed to a single command with a
single output to make things more clear. The content-type header
should also be sent to the server so it knows the body content.
This should fix #78

Signed-off-by: David Brown <dmlb2000@gmail.com>
  • Loading branch information
dmlb2000 committed May 11, 2019
1 parent ac44ded commit ecacccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions docs/exampleusage.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The HTTP `POST` method is used to stage a file for use. In posix this
equates to a no-op on hpss it stages the file to the disk drive.

```
curl -X POST http://127.0.0.1:8080/12345
curl -X POST -d '' http://127.0.0.1:8080/12345
```

Sample Output:
Expand All @@ -90,8 +90,9 @@ The upload file contains the path to current file on archive
The Id at the end of the url is where the file will be moved to

```
curl -X PATCH --upload-file /tmp/foo.json http://127.0.0.1:8080/2
curl -X PATCH -H 'Content-Type: application/json' http://127.0.0.1:8080/123456 -d'{
"path": "/tmp/12345"
}'
```

Sample Output:
Expand All @@ -100,9 +101,3 @@ Sample Output:
"message": "File Moved Successfully"
}
```
Sample Upload File
```
{
"path": "/path/to/file/file.1"
}
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
use_scm_version=True,
setup_requires=['setuptools_scm'],
description='Pacifica Archive Interface',
url='https://pypi.python.org/pypi/pacifica-archiveinterface/',
url='https://github.com/pacifica/pacifica-archiveinterface/',
long_description=open(path.join(
path.abspath(path.dirname(__file__)),
'README.md')).read(),
Expand Down

0 comments on commit ecacccb

Please sign in to comment.