How to Web post API Request

How to post this request using Blocks. I have all Values

var axios = require('axios');
var data = JSON.stringify({

var config = {
  method: 'post',
  url: '

  headers : {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'X-UserType': 'USER',
    'X-SourceID': 'WEB',
    'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
    'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
    'X-MACAddress': 'MAC_ADDRESS',
    'X-PrivateKey': 'API_KEY'
  data : data

.then(function (response) {
.catch(function (error) {

Use Set web.Request Headers block to set request headers.
Use web.Post Text block to send your Post request data.
Use Set web.url block to set your url

Use fetch not axios.
For axios need package to add which is not possible

Like this?

Or you have to create and link axios before js scripts

yes axios in not required
here is other R code


url <- "

json_body <- jsonlite::toJSON(list(

response <- POST(url, 
    config = list(
    'Content-Type'= 'application/json',
    'Accept'= 'application/json',
    'X-UserType'= 'USER',
    'X-SourceID'= 'WEB',
    'X-ClientLocalIP'= 'CLIENT_LOCAL_IP',
    'X-ClientPublicIP'= 'CLIENT_PUBLIC_IP',
    'X-MACAddress'= 'MAC_ADDRESS',
    'X-PrivateKey'= 'API_KEY'
    body = json_body,
    encode = "raw"

1 Like

Not like this

1 Like

but how? it returning error

Your logic is incorrect

can you show me block solution

Like this

Sorry for bad quality

Tried this returning responce code 405

Show your blocks

Use text block not web.put text (my bad sorry i made mistake inmy block)

And see my join block clearly



no. your blocks are correct.
With Post it returned Error Code : 400: Bad Request
with Put Error Code: 405: Method Not Allowed

This is because you used PUT method use POST block

No its not correct

okk now it returning with Put error Code 400
Added &password

Make this changes in your block

can anyone help with this