# Compose a POST request using web component

**URL:** <https://community.thunkable.com/t/compose-a-post-request-using-web-component/42897>\
**Category:** Questions about Thunkable X\
**Created:** [August 23, 2018, 5:45pm UTC](https://community.thunkable.com/t/compose-a-post-request-using-web-component/42897 "2018-08-23T17:45:10Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![sleon003x2rq](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@sleon003x2rq](https://community.thunkable.com/u/sleon003x2rq)\
**Post date:** [April 27, 2020, 6:06am UTC](https://community.thunkable.com/t/compose-a-post-request-using-web-component/42897/12 "2020-04-27T06:06:13Z")

</div>

How to pass Auth HTTP POST Request

@jared you gave me an idea

so i did some tests in 3 different apis i found online and this is what worked for me (my blocks should be self explanatory).

 ![auth](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d281d26f41177b8c1d5b771dc24db8241d7aad4.png)

Notes:  
don’t mind the naming conventions I was prototyping and too lazy to keep changing names.  
Authorization for most apis i came accross was always Basic and you will need to convert your user:passwd to base64 encoding. some apis use apikey:(password is blank) refer to api docs  
example lets say your your username:admin and password:passowrd1. go to a base64 encoder enter admin:password1 of and encode it. so for this case the block Authorization would look as such  
Authorization “Basic YWRtaW46cGFzc3dvcmQx”

sources:  
[HTTP Header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages)  
[base64encoder](https://www.base64encode.org)

---

_[View the full topic](https://community.thunkable.com/t/compose-a-post-request-using-web-component/42897)._
