http headers - Parsing Request Payload string -


can me in parsing data request payload string following one:

7|0|5|https://www.bosscapital.com/app/basic/|b8cc86b6e3bfeaf758de5845f8ebea08|com.optionfair.client.common.services.tradingservice|getassetdailyticks|j|1|2|3|4|2|5|5|cb|u9mc4gq|

thanks & regards ajay

you can call split() method on strings split them @ character. alternatively, can use regex.split(value, "<pattern>"); splitting, e.g. if have multiple characters want split at. <pattern> string here, can provide more 1 character (e.g. "\r\n" find line breaks).

using system;  class program {    static void main() {     string s = "7|0|5|https://www.bosscapital.com/app/basic/|b8cc86b6e3bfeaf758de5845f8ebea08|com.optionfair.client.common.services.tradingservice|getassetdailyticks|j|1|2|3|4|2|5|5|cb|u9mc4gq|";      // split string @ pipe character     string[] parts = s.split('|');      // process segments     foreach (string segment in parts) {       console.writeline(segment);        // use segmented data...     }   } } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -