2
我有一些參數,POST請求發送到服務器:如何發送下面的params請求?
`[{"LoginID":151,"UserID":0,"SubUserID":0,"WorkGroupID":92,"WorksFor":"Doctor","UserWorkGroup":0},{"SearchingFilters":{"GroupingOperator":"And","Filters":[{"SearchingValue":"04-13-2016","SearchingName":"AppointmentDate","SearchingOperator":"Ge"},{"SearchingValue":"04-27-2016","SearchingName":"AppointmentDate","SearchingOperator":"Le"}],"Groups":[{"Groups":[],"GroupingOperator":"And","Filters":[]}]},"Searching":true,"SortingOrder":"Desc","RecordsCount":10,"PageIndex":0}]`
如何像這種格式發送?
[getProfileServices sendSynchronousPostRequestWithStringForAction:getProfileURL andParameters:[[NSDictionary alloc] initWithObjectsAndKeys:[[NSUserDefaults standardUserDefaults] objectForKey:@"USER_ID"],@"LoginID",@"0",@"UserID",@"0",@"SubUserID",[[NSUserDefaults standardUserDefaults] objectForKey:@"WORK_ID"],@"WorkGroupID",@"Doctor",@"WorksFor",@"0",@"UserWorkGroup",nil] andRequestType:@"POST"];
[{ 「登錄ID」:151, 「用戶ID」:0, 「SubUserID」:0, 「WorkGroupID」:92, 「WorksFor」: 「醫生」, 「UserWorkGroup」:0 }, { 「SearchingFilters」:{ 「GroupingOperator」: 「和」, 「過濾器」:[ { 「SearchingValue」:「04 -13-2016" , 「SearchingName」: 「AppointmentDate」, 「SearchingOperator」: 「格」 },{ 「SearchingValue」: 「2016年4月27日」, 「SearchingName」: 「AppointmentDate」, 「SearchingOperator」:「Le」 } ], 「Groups」:[ { 「Groups」:[ ], 「GroupingOperator」: 「和」, 「過濾器」:[ ] } ] }, 「搜索」:真, 「SortingOrder」: 「商品說明」, 「RecordsCount」:10, 「的PageIndex」:0 } ] –
如何發送上述格式的數據在IOS –
這樣[getProfileServices sendSynchronousPostRequestWithStringForAction:getProfileURL andParameters:[[NSDictionary中的alloc] initWithObjectsAndKeys:[[NSUserDefaults的standardUserDefaults] objectForKey:@ 「USER_ID」],@ 「登錄ID」,@ 「0」,@ 「SubUserID」,[[NSUserDefaults的standardUserDefaults] objectForKey:@ 「WORK_ID」],@ 「WorkGroupID」,@ 「醫生」,@ 「WorksFor」,@ 「0」,@「UserWorkGroup 「,無]和R. equestType:@ 「POST」]; –