001package net.minecraft.client.mco; 002 003import cpw.mods.fml.relauncher.Side; 004import cpw.mods.fml.relauncher.SideOnly; 005import java.io.OutputStream; 006 007@SideOnly(Side.CLIENT) 008public class RequestPost extends Request 009{ 010 private byte[] field_96373_c; 011 012 public RequestPost(String par1Str, byte[] par2ArrayOfByte, int par3, int par4) 013 { 014 super(par1Str, par3, par4); 015 this.field_96373_c = par2ArrayOfByte; 016 } 017 018 public RequestPost func_96372_f() 019 { 020 try 021 { 022 this.field_96367_a.setDoInput(true); 023 this.field_96367_a.setDoOutput(true); 024 this.field_96367_a.setUseCaches(false); 025 this.field_96367_a.setRequestMethod("POST"); 026 OutputStream outputstream = this.field_96367_a.getOutputStream(); 027 outputstream.write(this.field_96373_c); 028 outputstream.flush(); 029 return this; 030 } 031 catch (Exception exception) 032 { 033 throw new ExceptionMcoHttp("Failed URL: " + this.field_96365_b, exception); 034 } 035 } 036 037 public Request func_96359_e() 038 { 039 return this.func_96372_f(); 040 } 041}