Make an NSURL with an encoded plus (+)

前端 未结 7 1154
北海茫月
北海茫月 2021-02-14 01:32

I need to pass a timestamp with a timezone offset in a GET request, e.g.,

2009-05-04T11:22:00+01:00

This looks like a two arguments

7条回答
  •  -上瘾入骨i
    2021-02-14 01:55

    Use NSString's stringByAddingPercentEscapesUsingEncoding: method on the text you want to include as an argument.

    As its name implies, the method will convert return an auto-released string containing an url-safe version of the receiver.

提交回复
热议问题