03_post

command
v0.0.0-...-baf0b24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 7 Imported by: 0

README

Curl for sending data

curl http://localhost:8080/user/2501

API : http://localhost:8080/user/:id

POST Data

curl -X POST -H "Content-Type: application/json" -d '{"name":"Harish","gender":"male","age":32}' http://localhost:8080/user

where:

  • -X is short for --request = type of request Specifies the custom request method to use in communicating with server
  • -H is short for --header = Adding Header field
  • -d is short for --data = String data

Delete User

curl -X DELETE -H "Content-Type: application/json" http://localhost:8080/user/3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL