wit-ai / wit-go

Go client for wit.ai HTTP API
MIT License
156 stars 30 forks source link

QueryEscape dont work with wit.ai api #9

Closed thibaultleouay closed 5 years ago

thibaultleouay commented 5 years ago

Hey,

I dont know if this issue should be reported here or in the main wit.ai repo.

But with the golang client when i try to delete a value with a space in it for an intent e.g

wit.DeleteEntityValue("intent", "Au revoir") The value is not deleted on wit.ai because of this : url.QueryEscape(value)

Standard QueryEscape call encodes a space with a "+" character.

Also this curl command dont work curl -XDELETE 'https://api.wit.ai/entities/intent/values/Au+revoir?v=20170307' But this one does curl -XDELETE 'https://api.wit.ai/entities/intent/values/Au%20revoir?v=20170307'

plutov commented 5 years ago

Thank you for this issue, we should probably change the escape to do URL Escape, I will also look into creating an integration test for it.