wit icon indicating copy to clipboard operation
wit copied to clipboard

Delete expression with special characters

Open mbukovy opened this issue 6 years ago • 1 comments

Hey,

we've ran into a problem with deleting expression. Everything works fine, until certain special characters are present in text - slash / and question mark ? (and possibly some other?).

Steps to reproduce:

  1. Save an expression to some intent with slash in text. E.g. let's save it is faster then 50Mb/s
  2. Try to delete this expression. We use this endpoint https://wit.ai/docs/http/20170307#delete__entities__entity_id_values__value_id_expressions_link
  3. Call DELETE https://api.wit.ai/entities/intent/values/problem/expressions/it is faster then 50Mb/s => api response will be Unknown path components: ... because it recognizes slash as a part of the url.

Second example

  1. Let's save another text with question mark in text, e.g. is it correct? I think not
  2. Try to delete the expression the same way as in previous example
  3. Call DELETE https://api.wit.ai/entities/intent/values/problem/expressions/is it correct? I think not => api response will be deleted "is it correct" and the rest of the sentence is ignored because of question mark in url

I've tried to encode or escape the text, but with no success. Can you please suggest, how to correctly delete these texts? It is a bug in our NLU partner solution and we'll be waiting for your response.

mbukovy avatar Apr 29 '20 13:04 mbukovy

can you try the DELETE /samples endpoint instead?

jtliao avatar May 04 '20 22:05 jtliao