How to send NULL in HTTP query string?

前端 未结 3 1878
广开言路
广开言路 2020-12-01 14:30

I\'m developing an API that can accept the main three data types as values to query string parameters: boolean, string & numeric (

相关标签:
3条回答
  • 2020-12-01 14:44

    Send a URLEncoded NUL value (%00) for any thing that you're specifically setting to null. It should be correctly URL Decoded.

    0 讨论(0)
  • 2020-12-01 14:48

    or just don't send any value. leave query param value empty in your get request url.. like -

    API URL/?foo=&some_other_param=value

    in the API foo will be received as null

    0 讨论(0)
  • 2020-12-01 15:09

    With IIS and C#, I send it this way:

    ?param=#
    
    0 讨论(0)
提交回复
热议问题