fix auth.
This commit is contained in:
parent
bbed21d42b
commit
53d15e76f4
1 changed files with 2 additions and 0 deletions
|
@ -101,7 +101,9 @@ func (i *Dcim_Interfaces_Create) CreateInterface(n *NetBox) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
request.Header.Add("Accept", "application/json")
|
request.Header.Add("Accept", "application/json")
|
||||||
|
request.Header.Add("Content-Type", "application/json")
|
||||||
request.Header.Add("Authorization", "Token "+n.Token)
|
request.Header.Add("Authorization", "Token "+n.Token)
|
||||||
|
fmt.Println(request.Header)
|
||||||
response, err := client.Do(request)
|
response, err := client.Do(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue