Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native - post raw text data

I want to send this type data in raw text format using react native. please help-

submit Qsubmit_form=1&form_noresubmit_code=1525265560&question=OKKKK NEW APPP&submit=

like image 349
priyanka Avatar asked Dec 20 '25 09:12

priyanka


1 Answers

You can use fetch API for both GET and POST requests. Example of POST request:

fetch('https://mywebsite.com/endpoint/', {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    firstParam: 'yourValue',
    secondParam: 'yourOtherValue',
  }),
});

You can check out official docs for networking here

like image 198
pritam Avatar answered Dec 22 '25 00:12

pritam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!