code: func (proxy *Proxy) AddToxic(name, typeName, stream string, toxicity float32, attrs Attributes) (*Toxic, error) {
  	toxic := Toxic{name, typeName, stream, toxicity, attrs}
  	if toxic.Toxicity == -1 {
  		toxic.Toxicity = 1 // Just to be consistent with a toxicity of -1 using the default
  	}
  
  	request, err := json.Marshal(&toxic)
  	if err != nil {
  		return nil, err
  	}
  
  	resp, err := http.Post(proxy.client.endpoint+"/proxies/"+proxy.Name+"/toxics", "application/json", bytes.NewReader(request))
  	if err != nil {
  		return nil, err
  	}
  
  	err = checkError(resp, http.StatusOK, "AddToxic")
  	if err != nil {
  		return nil, err
  	}
  
  	result := &Toxic{}
  	err = json.NewDecoder(resp.Body).Decode(result)
  	if err != nil {
  		return nil, err
  	}
  
  	return result, nil
  }
docs: // AddToxic adds a toxic to the given stream direction.
  // If a name is not specified, it will default to <type>_<stream>.
  // If a stream is not specified, it will default to downstream.
  // See https://github.com/Shopify/toxiproxy#toxics for a list of all Toxic types.